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
4eadf2ef
Commit
4eadf2ef
authored
Apr 16, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed flickering in Cairo-based rendering backend.
parent
bee0d692
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
drawpanel_gal.cpp
common/drawpanel_gal.cpp
+12
-11
class_drawpanel_gal.h
include/class_drawpanel_gal.h
+1
-1
No files found.
common/drawpanel_gal.cpp
View file @
4eadf2ef
...
@@ -78,12 +78,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
...
@@ -78,12 +78,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
m_viewControls
=
new
KiGfx
::
WX_VIEW_CONTROLS
(
m_view
,
this
);
m_viewControls
=
new
KiGfx
::
WX_VIEW_CONTROLS
(
m_view
,
this
);
#if wxCHECK_VERSION( 2, 9, 0 )
Connect
(
KiGfx
::
EVT_GAL_REDRAW
,
wxPaintEventHandler
(
EDA_DRAW_PANEL_GAL
::
onPaint
),
NULL
,
this
);
Connect
(
KiGfx
::
EVT_GAL_REDRAW
,
wxPaintEventHandler
(
EDA_DRAW_PANEL_GAL
::
onPaint
),
NULL
,
this
);
#elif wxCHECK_VERSION( 2, 8, 0 )
// FIXME Cairo needs this to be uncommented to remove blinking on refreshing
Connect
(
wxEVT_PAINT
,
wxPaintEventHandler
(
EDA_DRAW_PANEL_GAL
::
onPaint
),
NULL
,
this
);
#endif
Connect
(
wxEVT_SIZE
,
wxSizeEventHandler
(
EDA_DRAW_PANEL_GAL
::
onSize
),
NULL
,
this
);
Connect
(
wxEVT_SIZE
,
wxSizeEventHandler
(
EDA_DRAW_PANEL_GAL
::
onSize
),
NULL
,
this
);
}
}
...
@@ -105,6 +100,18 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL()
...
@@ -105,6 +100,18 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL()
void
EDA_DRAW_PANEL_GAL
::
onPaint
(
wxPaintEvent
&
aEvent
)
void
EDA_DRAW_PANEL_GAL
::
onPaint
(
wxPaintEvent
&
aEvent
)
{
Refresh
();
}
void
EDA_DRAW_PANEL_GAL
::
onSize
(
wxSizeEvent
&
aEvent
)
{
m_gal
->
ResizeScreen
(
aEvent
.
GetSize
().
x
,
aEvent
.
GetSize
().
y
);
}
void
EDA_DRAW_PANEL_GAL
::
Refresh
(
bool
eraseBackground
,
const
wxRect
*
rect
)
{
{
m_gal
->
BeginDrawing
();
m_gal
->
BeginDrawing
();
m_gal
->
SetBackgroundColor
(
KiGfx
::
COLOR4D
(
0
,
0
,
0
,
1.0
)
);
m_gal
->
SetBackgroundColor
(
KiGfx
::
COLOR4D
(
0
,
0
,
0
,
1.0
)
);
...
@@ -122,12 +129,6 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent )
...
@@ -122,12 +129,6 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent )
}
}
void
EDA_DRAW_PANEL_GAL
::
onSize
(
wxSizeEvent
&
aEvent
)
{
m_gal
->
ResizeScreen
(
aEvent
.
GetSize
().
x
,
aEvent
.
GetSize
().
y
);
}
void
EDA_DRAW_PANEL_GAL
::
SwitchBackend
(
GalType
aGalType
,
bool
aUseShaders
)
void
EDA_DRAW_PANEL_GAL
::
SwitchBackend
(
GalType
aGalType
,
bool
aUseShaders
)
{
{
if
(
m_gal
)
if
(
m_gal
)
...
...
include/class_drawpanel_gal.h
View file @
4eadf2ef
...
@@ -75,7 +75,7 @@ public:
...
@@ -75,7 +75,7 @@ public:
void
SetView
(
KiGfx
::
VIEW
*
aView
)
{
m_view
=
aView
;
}
void
SetView
(
KiGfx
::
VIEW
*
aView
)
{
m_view
=
aView
;
}
KiGfx
::
VIEW
*
GetView
()
const
{
return
m_view
;
}
KiGfx
::
VIEW
*
GetView
()
const
{
return
m_view
;
}
//
void Refresh( bool eraseBackground = true, const wxRect* rect = NULL );
virtual
void
Refresh
(
bool
eraseBackground
=
true
,
const
wxRect
*
rect
=
NULL
);
protected
:
protected
:
void
onPaint
(
wxPaintEvent
&
aEvent
);
void
onPaint
(
wxPaintEvent
&
aEvent
);
...
...
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