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
b076f3fe
Commit
b076f3fe
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed grid drawing when the grid origin has negative coordinates.
parent
84fa537b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
graphics_abstraction_layer.cpp
common/gal/graphics_abstraction_layer.cpp
+4
-4
No files found.
common/gal/graphics_abstraction_layer.cpp
View file @
b076f3fe
...
@@ -157,10 +157,10 @@ void GAL::DrawGrid()
...
@@ -157,10 +157,10 @@ void GAL::DrawGrid()
assert
(
gridEndY
>=
gridStartY
);
assert
(
gridEndY
>=
gridStartY
);
// Correct the index, else some lines are not correctly painted
// Correct the index, else some lines are not correctly painted
gridStartX
-=
(
gridOrigin
.
x
/
gridSize
.
x
)
+
1
;
gridStartX
-=
abs
(
gridOrigin
.
x
/
gridSize
.
x
)
+
1
;
gridStartY
-=
(
gridOrigin
.
y
/
gridSize
.
y
)
+
1
;
gridStartY
-=
abs
(
gridOrigin
.
y
/
gridSize
.
y
)
+
1
;
gridEndX
+=
(
gridOrigin
.
x
/
gridSize
.
x
)
+
1
;
gridEndX
+=
abs
(
gridOrigin
.
x
/
gridSize
.
x
)
+
1
;
gridEndY
+=
(
gridOrigin
.
y
/
gridSize
.
y
)
+
1
;
gridEndY
+=
abs
(
gridOrigin
.
y
/
gridSize
.
y
)
+
1
;
// Draw the grid behind all other layers
// Draw the grid behind all other layers
SetLayerDepth
(
depthRange
.
y
*
0.75
);
SetLayerDepth
(
depthRange
.
y
*
0.75
);
...
...
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