Commit 08589350 authored by mrbean-bremen's avatar mrbean-bremen
Browse files

Make sure that Use elements are redrawn for each new parent

- fixes text-text-12-t.svg
No related merge requests found
Showing with 16 additions and 0 deletions
+16 -0
...@@ -80,6 +80,9 @@ namespace Svg ...@@ -80,6 +80,9 @@ namespace Svg
{ {
var origParent = element.Parent; var origParent = element.Parent;
element._parent = this; 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.RenderElement(renderer);
element._parent = origParent; element._parent = origParent;
} }
......
...@@ -26,6 +26,18 @@ namespace Svg ...@@ -26,6 +26,18 @@ namespace Svg
set { this._dirty = value; } 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) protected static float FixOpacityValue(float value)
{ {
const float max = 1.0f; const float max = 1.0f;
......
...@@ -163,6 +163,7 @@ text-text-08-b.svg ...@@ -163,6 +163,7 @@ text-text-08-b.svg
text-text-09-t.svg text-text-09-t.svg
text-text-10-t.svg text-text-10-t.svg
text-text-11-t.svg text-text-11-t.svg
text-text-12-t.svg
text-tref-01-b.svg text-tref-01-b.svg
text-tspan-01-b.svg text-tspan-01-b.svg
text-ws-01-t.svg text-ws-01-t.svg
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment