Table of Contents

Enum SvgPaintOrder

Namespace
Egami.Svg
Assembly
Egami.Svg.dll

Which of a shape's fill, stroke and markers is painted first (paint-order).

public enum SvgPaintOrder

Fields

FillMarkersStroke = 1

Fill, markers, stroke.

FillStrokeMarkers = 0

Fill, then stroke, then markers: the default.

MarkersFillStroke = 4

Markers, fill, stroke.

MarkersStrokeFill = 5

Markers, stroke, fill.

StrokeFillMarkers = 2

Stroke, fill, markers.

StrokeMarkersFill = 3

Stroke, 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);