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
e56835db
"Source/vscode:/vscode.git/clone" did not exist on "6f53360e477d3b9b72f09e2b862ca1baedf29520"
Commit
e56835db
authored
Nov 17, 2016
by
Tebjan Halm
Committed by
GitHub
Nov 17, 2016
Browse files
Merge pull request #255 from frohlfs/viewBox
Nested svg areas are misplaced or invisible
parents
18c1b3bf
4262da02
Changes
3
Hide whitespace changes
Inline
Side-by-side
Source/DataTypes/SvgViewBox.cs
View file @
e56835db
...
...
@@ -131,7 +131,7 @@ namespace Svg
if
(
this
.
Equals
(
SvgViewBox
.
Empty
))
{
renderer
.
TranslateTransform
(
x
,
y
);
renderer
.
TranslateTransform
(
x
,
y
,
MatrixOrder
.
Prepend
);
return
;
}
...
...
@@ -199,11 +199,11 @@ namespace Svg
break
;
}
}
renderer
.
SetClip
(
new
Region
(
new
RectangleF
(
x
,
y
,
width
,
height
)),
CombineMode
.
Intersect
);
renderer
.
Scal
eTransform
(
fScaleX
,
fScaleY
,
MatrixOrder
.
Prepend
);
renderer
.
TranslateTransform
(
x
,
y
);
renderer
.
Translat
eTransform
(
f
MinX
,
fMinY
);
renderer
.
Translat
eTransform
(
x
,
y
,
MatrixOrder
.
Prepend
);
renderer
.
TranslateTransform
(
fMinX
,
fMinY
,
MatrixOrder
.
Prepend
);
renderer
.
Scal
eTransform
(
f
ScaleX
,
fScaleY
,
MatrixOrder
.
Prepend
);
}
}
...
...
Tests/W3CTestSuite/png/__issueViewBox.png
0 → 100644
View file @
e56835db
2.52 KB
Tests/W3CTestSuite/svg/__issueViewBox.svg
0 → 100644
View file @
e56835db
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg
x=
"0"
y=
"0"
width=
"450"
height=
"551"
viewBox=
"0 0 670 820"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<rect
x=
"0"
y=
"0"
width=
"670"
height=
"820"
style=
"fill:black"
/>
<rect
x=
"100"
y=
"200"
width=
"50"
height=
"100"
style=
"fill:blue"
/>
<svg
x=
"100"
y=
"200"
width=
"50"
height=
"100"
viewBox=
"0 0 75 150"
>
<line
x1=
"0"
y1=
"0"
x2=
"75"
y2=
"0"
style=
"stroke:white;"
/>
<line
x1=
"75"
y1=
"0"
x2=
"75"
y2=
"150"
style=
"stroke:white;"
/>
<line
x1=
"75"
y1=
"150"
x2=
"0"
y2=
"150"
style=
"stroke:white;"
/>
<line
x1=
"0"
y1=
"150"
x2=
"0"
y2=
"0"
style=
"stroke:white;"
/>
</svg>
<rect
x=
"200"
y=
"200"
width=
"50"
height=
"25"
style=
"fill:blue"
/>
<svg
x=
"200"
y=
"200"
width=
"50"
height=
"100"
viewBox=
"0 0 100 50"
preserveAspectRatio=
"xMaxYMin meet"
>
<line
x1=
"0"
y1=
"0"
x2=
"100"
y2=
"0"
style=
"stroke:white;"
/>
<line
x1=
"100"
y1=
"0"
x2=
"100"
y2=
"50"
style=
"stroke:white;"
/>
<line
x1=
"100"
y1=
"50"
x2=
"0"
y2=
"50"
style=
"stroke:white;"
/>
<line
x1=
"0"
y1=
"50"
x2=
"0"
y2=
"0"
style=
"stroke:white;"
/>
</svg>
<rect
x=
"300"
y=
"275"
width=
"50"
height=
"25"
style=
"fill:blue"
/>
<svg
x=
"300"
y=
"200"
width=
"50"
height=
"100"
viewBox=
"0 0 100 50"
preserveAspectRatio=
"xMaxYMax meet"
>
<line
x1=
"0"
y1=
"0"
x2=
"100"
y2=
"0"
style=
"stroke:white;"
/>
<line
x1=
"100"
y1=
"0"
x2=
"100"
y2=
"50"
style=
"stroke:white;"
/>
<line
x1=
"100"
y1=
"50"
x2=
"0"
y2=
"50"
style=
"stroke:white;"
/>
<line
x1=
"0"
y1=
"50"
x2=
"0"
y2=
"0"
style=
"stroke:white;"
/>
</svg>
</svg>
\ No newline at end of file
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