Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
062fc2d2
Commit
062fc2d2
authored
Apr 19, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some cleanup.
parent
5d704c96
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
17 deletions
+17
-17
drawpanel_gal.cpp
common/drawpanel_gal.cpp
+3
-2
cairo_gal.cpp
common/gal/cairo/cairo_gal.cpp
+6
-4
opengl_gal.cpp
common/gal/opengl/opengl_gal.cpp
+0
-7
view.cpp
common/view/view.cpp
+4
-0
wx_view_controls.cpp
common/view/wx_view_controls.cpp
+1
-1
graphics_abstraction_layer.h
include/gal/graphics_abstraction_layer.h
+3
-3
No files found.
common/drawpanel_gal.cpp
View file @
062fc2d2
...
...
@@ -48,6 +48,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
{
m_gal
=
NULL
;
m_view
=
NULL
;
m_painter
=
NULL
;
m_galShaderPath
=
std
::
string
(
::
wxGetCwd
().
mb_str
()
)
+
"/../../gal/opengl/shader/"
;
...
...
common/gal/cairo/cairo_gal.cpp
View file @
062fc2d2
...
...
@@ -25,7 +25,7 @@
*/
#include <wx/dcbuffer.h>
#include <wx/
rawbmp
.h>
#include <wx/
image
.h>
#include <wx/log.h>
#include <gal/cairo/cairo_gal.h>
...
...
@@ -93,6 +93,9 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener,
CAIRO_GAL
::~
CAIRO_GAL
()
{
delete
cursorPixels
;
delete
cursorPixelsSaved
;
// TODO Deleting of list contents like groups and paths
deleteBitmaps
();
}
...
...
@@ -192,11 +195,10 @@ void CAIRO_GAL::EndDrawing()
*
wxOutputPtr
++
=
value
&
0xff
;
// Blue pixel
}
wxImage
img
(
(
int
)
screenSize
.
x
,
(
int
)
screenSize
.
y
,
(
unsigned
char
*
)
wxOutput
,
true
);
wxImage
img
(
(
int
)
screenSize
.
x
,
(
int
)
screenSize
.
y
,
(
unsigned
char
*
)
wxOutput
,
true
);
wxBitmap
bmp
(
img
);
wxClientDC
client_dc
(
this
);
wxBufferedDC
dc
;
// client_dc.DrawBitmap(bmp, 0, 0, false);
dc
.
Init
(
&
client_dc
,
bmp
);
// Destroy Cairo objects
...
...
@@ -909,7 +911,7 @@ void CAIRO_GAL::allocateBitmaps()
bitmapBuffer
=
new
unsigned
int
[
bufferSize
];
bitmapBufferBackup
=
new
unsigned
int
[
bufferSize
];
wxOutput
=
new
unsigned
char
[
bufferSize
*
4
];
wxOutput
=
new
unsigned
char
[
bufferSize
*
3
];
}
...
...
common/gal/opengl/opengl_gal.cpp
View file @
062fc2d2
...
...
@@ -40,14 +40,7 @@ using namespace KiGfx;
// Prototypes
void
InitTesselatorCallbacks
(
GLUtesselator
*
aTesselator
);
// FIXME Checking of attributes
// #if defined(__WXGTK__)
const
int
glAttributes
[]
=
{
WX_GL_RGBA
,
WX_GL_DOUBLEBUFFER
,
WX_GL_DEPTH_SIZE
,
16
,
0
};
// #elif defined(__WXMSW__)
// #define glAttributes NULL
// #endif
OPENGL_GAL
::
OPENGL_GAL
(
wxWindow
*
aParent
,
wxEvtHandler
*
aMouseListener
,
wxEvtHandler
*
aPaintListener
,
bool
isUseShaders
,
const
wxString
&
aName
)
:
...
...
common/view/view.cpp
View file @
062fc2d2
...
...
@@ -150,6 +150,10 @@ VIEW::VIEW( bool aIsDynamic, bool aUseGroups ) :
VIEW
::~
VIEW
()
{
BOOST_FOREACH
(
LayerMap
::
value_type
&
l
,
m_layers
)
{
delete
l
.
second
.
items
;
}
}
...
...
common/view/wx_view_controls.cpp
View file @
062fc2d2
...
...
@@ -126,7 +126,7 @@ void WX_VIEW_CONTROLS::onButton( wxMouseEvent& event )
{
m_isDragPanning
=
true
;
m_dragStartPoint
=
VECTOR2D
(
event
.
GetX
(),
event
.
GetY
()
);
m_lookStartPoint
=
m_view
->
GetCenter
();
// ookAtPoint();
m_lookStartPoint
=
m_view
->
GetCenter
();
}
else
if
(
event
.
RightUp
()
)
{
...
...
include/gal/graphics_abstraction_layer.h
View file @
062fc2d2
...
...
@@ -644,7 +644,7 @@ public:
*/
virtual
void
DrawCursor
(
VECTOR2D
aCursorPosition
)
=
0
;
void
AdvanceDepth
()
inline
void
AdvanceDepth
()
{
layerDepth
-=
0
.
1
;
// fixme: there should be a minimum step
}
...
...
@@ -652,7 +652,7 @@ public:
/**
* @brief Stores current drawing depth on the depth stack.
*/
void
PushDepth
()
inline
void
PushDepth
()
{
depthStack
.
push
(
layerDepth
);
}
...
...
@@ -660,7 +660,7 @@ public:
/**
* @brief Restores previously stored drawing depth for the depth stack.
*/
void
PopDepth
()
inline
void
PopDepth
()
{
layerDepth
=
depthStack
.
top
();
depthStack
.
pop
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment