Commit 9ecefde8 authored by mrbean-bremen's avatar mrbean-bremen Committed by mrbean-bremen
Browse files

For a "use" element, return the bounds of the referenced element

- fixes TestPrivateFront unit test (threw exception because the image
  had zero size, as the only element is a "use" element)
parent df558214
......@@ -64,7 +64,15 @@ namespace Svg
public override System.Drawing.RectangleF Bounds
{
get { return new System.Drawing.RectangleF(); }
get
{
var element = this.OwnerDocument.IdManager.GetElementById(this.ReferencedElement) as SvgVisualElement;
if (element != null)
{
return element.Bounds;
}
return new System.Drawing.RectangleF();
}
}
protected override bool Renderable { get { return false; } }
......
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