Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
7eff50ac
"vscode:/vscode.git/clone" did not exist on "f03ac5bdf49ba82fa18f5f3d515b22ab40a23707"
Commit
7eff50ac
authored
Jul 28, 2015
by
ubbn
Browse files
Allowed negative coordinates. Fix to #174
parent
9abf0a1a
Changes
1
Show whitespace changes
Inline
Side-by-side
Source/Document Structure/SvgFragment.cs
View file @
7eff50ac
...
@@ -244,12 +244,13 @@ namespace Svg
...
@@ -244,12 +244,13 @@ namespace Svg
else
else
{
{
bounds
=
this
.
Bounds
;
//do just one call to the recursive bounds property
bounds
=
this
.
Bounds
;
//do just one call to the recursive bounds property
this
.
ViewBox
=
new
SvgViewBox
(
bounds
.
X
,
bounds
.
Y
,
bounds
.
Width
,
bounds
.
Height
);
}
}
}
}
if
(
isWidthperc
)
if
(
isWidthperc
)
{
{
w
=
(
bounds
.
Width
+
bounds
.
X
)
*
(
Width
.
Value
*
0.01f
);
w
=
(
bounds
.
Width
)
*
(
Width
.
Value
*
0.01f
);
}
}
else
else
{
{
...
@@ -257,7 +258,7 @@ namespace Svg
...
@@ -257,7 +258,7 @@ namespace Svg
}
}
if
(
isHeightperc
)
if
(
isHeightperc
)
{
{
h
=
(
bounds
.
Height
+
bounds
.
Y
)
*
(
Height
.
Value
*
0.01f
);
h
=
(
bounds
.
Height
)
*
(
Height
.
Value
*
0.01f
);
}
}
else
else
{
{
...
...
Write
Preview
Supports
Markdown
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