Exemplo n.º 1
0
 internal static State <SvgDrawState, XElementBuilder> RenderSvg(IDiagram diagram)
 {
     return(diagram switch
     {
         CircleDiagram x => RenderCircle(x),
         EllipseDiagram x => RenderEllipseDiagram(x),
         CompositeDiagram x => RenderCompositeDiagram(x),
         ViewboxDiagram x => RenderViewboxDiagram(x),
         ScaledDiagram x => RenderScaled(x),
         OffsetDiagram x => RenderOffsetDiagram(x),
         StyleDecorator x => RenderStyleDecorator(x),
         BoundingBoxOverridingDiagram x => RenderSvg(x.Diagram),
         RectangleDiagram x => RenderRectangle(x),
         PolygonDiagram x => RenderPolygon(x),
         DefinedDiagram x => RenderDefined(x),
         WhitelistMask x => RenderWhitelistMask(x),
         RotatedDiagram x => RenderRotated(x),
         PathDiagram x => RenderPathDiagram(x),
         //we should probably gravitate away from this exception in the nearish future.
         _ => throw new DiagramNotRenderableException(diagram)
     });
Exemplo n.º 2
0
 public static IDiagram Then(this IDiagram input, IDiagram next) =>
 CompositeDiagram.SingleItem(input).FollowedBy(next);
Exemplo n.º 3
0
 public static IDiagram Compose(this IEnumerable <IDiagram> diagrams) =>
 CompositeDiagram.Compose(diagrams);
Exemplo n.º 4
0
 public static IDiagram ComposedOf(params IDiagram[] diagrams) =>
 CompositeDiagram.Compose(diagrams);