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
8789ca5f
Commit
8789ca5f
authored
Jan 15, 2010
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drawpanel.cpp: fixed a serious bug in draw grid fast algo.
Fast algo currently disabled (tests needed)
parent
b41e4e69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
drawpanel.cpp
common/drawpanel.cpp
+7
-4
No files found.
common/drawpanel.cpp
View file @
8789ca5f
...
...
@@ -769,11 +769,13 @@ void WinEDA_DrawPanel::DrawBackGround( 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
ndef __WXMSW__
#if
1
// 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
#if defined ( __WXMAC__ )
wxWindowUpdateLocker
(
this
);
// under macOSX: drawings are faster with this
#endif
for
(
ii
=
0
;
;
ii
++
)
{
xg
=
wxRound
(
ii
*
screen_grid_size
.
x
);
...
...
@@ -792,10 +794,11 @@ void WinEDA_DrawPanel::DrawBackGround( wxDC* DC )
}
#else // Currently on test: Use a fast way to draw the grid
// But this is fast if the Blit function is fast. Not true on all platforms
// But this is fast
only
if the Blit function is fast. Not true on all platforms
// a grid column is drawn; and then copied to others grid columns
// this is possible because the grid is drawn only after clearing the screen.
// under MACOSX, is very slow and seems crash under Linux
// under MACOSX, is very slow
wxSize
screenSize
=
GetClientSize
();
ii
=
1
;
xg
=
wxRound
(
ii
*
screen_grid_size
.
x
);
int
x0pos
=
GRMapX
(
org
.
x
+
xg
);
...
...
@@ -815,7 +818,7 @@ void WinEDA_DrawPanel::DrawBackGround( wxDC* DC )
if
(
xg
>
size
.
x
)
break
;
xpos
=
GRMapX
(
org
.
x
+
xg
);
DC
->
Blit
(
xpos
,
ypos
,
1
,
size
.
y
,
DC
,
x0pos
,
ypos
);
DC
->
Blit
(
xpos
,
ypos
,
1
,
s
creenS
ize
.
y
,
DC
,
x0pos
,
ypos
);
}
#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