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
08589350
Commit
08589350
authored
Mar 19, 2017
by
mrbean-bremen
Browse files
Make sure that Use elements are redrawn for each new parent
- fixes text-text-12-t.svg
parent
3a59a7c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Source/Document Structure/SvgUse.cs
View file @
08589350
...
...
@@ -80,6 +80,9 @@ namespace Svg
{
var
origParent
=
element
.
Parent
;
element
.
_parent
=
this
;
// as the new parent may have other styles that are inherited,
// we have to redraw the paths for the children
element
.
InvalidateChildPaths
();
element
.
RenderElement
(
renderer
);
element
.
_parent
=
origParent
;
}
...
...
Source/SvgElementStyle.cs
View file @
08589350
...
...
@@ -26,6 +26,18 @@ namespace Svg
set
{
this
.
_dirty
=
value
;
}
}
/// <summary>
/// Force recreation of the paths for the element and it's children.
/// </summary>
public
void
InvalidateChildPaths
()
{
this
.
IsPathDirty
=
true
;
foreach
(
SvgElement
element
in
this
.
Children
)
{
element
.
InvalidateChildPaths
();
}
}
protected
static
float
FixOpacityValue
(
float
value
)
{
const
float
max
=
1.0f
;
...
...
Tests/W3CTestSuite/PassingTests.txt
View file @
08589350
...
...
@@ -163,6 +163,7 @@ text-text-08-b.svg
text-text-09-t.svg
text-text-10-t.svg
text-text-11-t.svg
text-text-12-t.svg
text-tref-01-b.svg
text-tspan-01-b.svg
text-ws-01-t.svg
...
...
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