Commit 1818255b authored by Tebjan Halm's avatar Tebjan Halm
Browse files

Merge pull request #98 from sschurig/master

External CSS Option for SVGDocument
parents 780b5150 a9e66c2a
......@@ -75,6 +75,11 @@ namespace Svg
/// Gets or sets the Pixels Per Inch of the rendered image.
/// </summary>
public int Ppi { get; set; }
/// <summary>
/// Gets or sets an external Cascading Style Sheet (CSS)
/// </summary>
public string ExternalCSSHref { get; set; }
#region ITypeDescriptorContext Members
......@@ -481,6 +486,9 @@ namespace Svg
xmlWriter.Formatting = Formatting.Indented;
xmlWriter.WriteDocType("svg", "-//W3C//DTD SVG 1.1//EN", "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd", null);
if (!String.IsNullOrEmpty(this.ExternalCSSHref))
xmlWriter.WriteProcessingInstruction("xml-stylesheet", String.Format("type=\"text/css\" href=\"{0}\"", this.ExternalCSSHref));
this.WriteElement(xmlWriter);
......@@ -495,4 +503,4 @@ namespace Svg
}
}
}
}
\ No newline at end of file
}
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