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
7645ed86
Commit
7645ed86
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Grid offset is recomputed only when settings are changed.
parent
1f7ce541
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
graphics_abstraction_layer.cpp
common/gal/graphics_abstraction_layer.cpp
+0
-3
graphics_abstraction_layer.h
include/gal/graphics_abstraction_layer.h
+6
-0
No files found.
common/gal/graphics_abstraction_layer.cpp
View file @
7645ed86
...
@@ -134,9 +134,6 @@ void GAL::DrawGrid()
...
@@ -134,9 +134,6 @@ void GAL::DrawGrid()
// Draw the grid
// Draw the grid
// For the drawing the start points, end points and increments have
// For the drawing the start points, end points and increments have
// to be calculated in world coordinates
// to be calculated in world coordinates
gridOffset
=
VECTOR2D
(
(
long
)
gridOrigin
.
x
%
(
long
)
gridSize
.
x
,
(
long
)
gridOrigin
.
y
%
(
long
)
gridSize
.
y
);
VECTOR2D
worldStartPoint
=
screenWorldMatrix
*
VECTOR2D
(
0.0
,
0.0
);
VECTOR2D
worldStartPoint
=
screenWorldMatrix
*
VECTOR2D
(
0.0
,
0.0
);
VECTOR2D
worldEndPoint
=
screenWorldMatrix
*
VECTOR2D
(
screenSize
);
VECTOR2D
worldEndPoint
=
screenWorldMatrix
*
VECTOR2D
(
screenSize
);
...
...
include/gal/graphics_abstraction_layer.h
View file @
7645ed86
...
@@ -631,6 +631,9 @@ public:
...
@@ -631,6 +631,9 @@ public:
inline
void
SetGridOrigin
(
const
VECTOR2D
&
aGridOrigin
)
inline
void
SetGridOrigin
(
const
VECTOR2D
&
aGridOrigin
)
{
{
gridOrigin
=
aGridOrigin
;
gridOrigin
=
aGridOrigin
;
gridOffset
=
VECTOR2D
(
(
long
)
gridOrigin
.
x
%
(
long
)
gridSize
.
x
,
(
long
)
gridOrigin
.
y
%
(
long
)
gridSize
.
y
);
}
}
/**
/**
...
@@ -661,6 +664,9 @@ public:
...
@@ -661,6 +664,9 @@ public:
inline
void
SetGridSize
(
const
VECTOR2D
&
aGridSize
)
inline
void
SetGridSize
(
const
VECTOR2D
&
aGridSize
)
{
{
gridSize
=
aGridSize
;
gridSize
=
aGridSize
;
gridOffset
=
VECTOR2D
(
(
long
)
gridOrigin
.
x
%
(
long
)
gridSize
.
x
,
(
long
)
gridOrigin
.
y
%
(
long
)
gridSize
.
y
);
}
}
/**
/**
...
...
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