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
bf67eed7
Commit
bf67eed7
authored
Sep 19, 2010
by
Marco Serantoni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OSX adjustments - grid fix - speedup of refresh
parent
5b832a66
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
16 deletions
+31
-16
drawpanel.cpp
common/drawpanel.cpp
+27
-6
class_pad_draw_functions.cpp
pcbnew/class_pad_draw_functions.cpp
+0
-5
controle.cpp
pcbnew/controle.cpp
+4
-0
toolbars_update_user_interface.cpp
pcbnew/toolbars_update_user_interface.cpp
+0
-5
No files found.
common/drawpanel.cpp
View file @
bf67eed7
...
...
@@ -117,6 +117,11 @@ void WinEDA_DrawPanel::DrawCursor( wxDC* aDC, int aColor )
if
(
m_CursorLevel
!=
0
||
aDC
==
NULL
)
return
;
#ifdef __WXMAC__
SetCursor
(
*
wxCROSS_CURSOR
);
return
;
#endif
wxPoint
Cursor
=
GetScreen
()
->
m_Curseur
;
GRSetDrawMode
(
aDC
,
GR_XOR
);
...
...
@@ -812,16 +817,32 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
// Under linux, to be tested (could be depend on linux versions
// so perhaps could be necessary to set this option at run time.
#if defined( __WXMAC__ )
wxWindowUpdateLocker
(
this
);
// under macOSX: drawings are faster with this
#endif
/* The bitmap grid drawing code below cannot be used when wxDC scaling is used
* as it does not scale the grid bitmap properly. This needs to be fixed.
*/
#if defined( __WXMAC__ ) || defined( USE_WX_ZOOM )
#if defined( __WXMAC__ ) && !defined( USE_WX_ZOOM )
// Use a pixel based draw to display grid
// When is not used USE_WX_ZOOM
for
(
ii
=
0
;
;
ii
++
)
{
xg
=
wxRound
(
ii
*
screen_grid_size
.
x
);
if
(
xg
>
size
.
x
)
break
;
xpos
=
org
.
x
+
xg
;
xpos
=
GRMapX
(
xpos
);
for
(
jj
=
0
;
;
jj
++
)
{
yg
=
wxRound
(
jj
*
screen_grid_size
.
y
);
if
(
yg
>
size
.
y
)
break
;
ypos
=
org
.
y
+
yg
;
DC
->
DrawPoint
(
xpos
,
GRMapY
(
ypos
)
);
}
}
#endif
#if defined( USE_WX_ZOOM )
// Use a pixel based draw to display grid
// There is a lot of calls, so the cost is hight
// and grid is slowly drawn on some platforms
...
...
pcbnew/class_pad_draw_functions.cpp
View file @
bf67eed7
...
...
@@ -113,11 +113,6 @@ void D_PAD::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDraw_mode,
else
drawInfo
.
m_ShowPadFilled
=
false
;
#if defined(PCBNEW) || defined(__WXMAC__)
if
(
m_Flags
&
IS_MOVED
||
!
DisplayOpt
.
DisplayPadFill
)
drawInfo
.
m_ShowPadFilled
=
false
;
#endif
if
(
m_Masque_Layer
&
LAYER_FRONT
)
{
color
=
brd
->
GetVisibleElementColor
(
PAD_FR_VISIBLE
);
...
...
pcbnew/controle.cpp
View file @
bf67eed7
...
...
@@ -361,6 +361,10 @@ void WinEDA_PcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
if
(
DrawPanel
->
ManageCurseur
)
{
#ifdef __WXMAC__
DrawPanel
->
Refresh
();
DrawPanel
->
Update
();
#endif
DrawPanel
->
ManageCurseur
(
DrawPanel
,
DC
,
TRUE
);
}
}
...
...
pcbnew/toolbars_update_user_interface.cpp
View file @
bf67eed7
...
...
@@ -281,9 +281,4 @@ void WinEDA_PcbFrame::SetToolbars()
PrepareLayerIndicator
();
DisplayUnitsMsg
();
#ifdef __WXMAC__
// Needed to avoid cursor tail
this
->
Refresh
();
#endif
}
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