Enum SvgPaintOrder
Which of a shape's fill, stroke and markers is painted first (paint-order).
public enum SvgPaintOrder
Fields
FillMarkersStroke = 1Fill, markers, stroke.
FillStrokeMarkers = 0Fill, then stroke, then markers: the default.
MarkersFillStroke = 4Markers, fill, stroke.
MarkersStrokeFill = 5Markers, stroke, fill.
StrokeFillMarkers = 2Stroke, fill, markers.
StrokeMarkersFill = 3Stroke, markers, fill.
Examples
// The resolved tree: groups, paths with their paints and strokes, images; styles applied and units in pixels.
static void Walk(SvgNode node, int depth)
{
string what = node switch
{
SvgPath path => $"path {path.Path.Bounds} fill {path.Fill}",
SvgGroup group => $"group of {group.Children.Count}",
SvgImage image => $"image {image.Destination}",
_ => node.GetType().Name,
};
Console.WriteLine($"{new string(' ', depth * 2)}{node.Id} {what} opacity {node.Opacity}");
if (node is SvgGroup g)
{
foreach (SvgNode child in g.Children)
{
Walk(child, depth + 1);
}
}
}
Walk(document.RenderTree, 0);