Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Courses
DrawSVG
Commits
f80c9a07
Commit
f80c9a07
authored
Sep 14, 2017
by
Nick Sharp
Browse files
use consistent bounds
parent
81100792
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/software_renderer.cpp
View file @
f80c9a07
...
...
@@ -25,10 +25,10 @@ void SoftwareRendererImp::draw_svg( SVG& svg ) {
}
// draw canvas outline
Vector2D
a
=
transform
(
Vector2D
(
0
,
0
));
a
.
x
--
;
a
.
y
++
;
Vector2D
b
=
transform
(
Vector2D
(
svg
.
width
,
0
));
b
.
x
++
;
b
.
y
++
;
Vector2D
c
=
transform
(
Vector2D
(
0
,
svg
.
height
));
c
.
x
--
;
c
.
y
--
;
Vector2D
d
=
transform
(
Vector2D
(
svg
.
width
,
svg
.
height
));
d
.
x
++
;
d
.
y
--
;
Vector2D
a
=
transform
(
Vector2D
(
0
,
0
));
a
.
x
--
;
a
.
y
--
;
Vector2D
b
=
transform
(
Vector2D
(
svg
.
width
,
0
));
b
.
x
++
;
b
.
y
--
;
Vector2D
c
=
transform
(
Vector2D
(
0
,
svg
.
height
));
c
.
x
--
;
c
.
y
++
;
Vector2D
d
=
transform
(
Vector2D
(
svg
.
width
,
svg
.
height
));
d
.
x
++
;
d
.
y
++
;
rasterize_line
(
a
.
x
,
a
.
y
,
b
.
x
,
b
.
y
,
Color
::
Black
);
rasterize_line
(
a
.
x
,
a
.
y
,
c
.
x
,
c
.
y
,
Color
::
Black
);
...
...
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