Meziantou.Framework.VectorGraphics namespace

Classes

NameDescription
AfmTextMeasurerMeasures text with the metrics of Helvetica, Helvetica-Bold, Helvetica-Oblique and Helvetica-BoldOblique, the standard fonts of PDF, without any font file or system font: the measurement is the same on every machine.
ContextPaintThe paint of the shape a marker is drawn on, as the SVG 2 context-fill and context-stroke values: an arrowhead of the color of the line it ends.
FontFaceTextMeasurerMeasures text by shaping it with a font of Meziantou.Framework.Fonts: every script, ligatures, kerning and the advances of the font are taken into account.
LinearGradientPaintA linear gradient, between two points in the coordinates of the shape it paints.
PathBuilderBuilds a PathData.
PathDataThe geometry of a ScenePath: a list of commands, as in SVG.
PatternPaintA pattern: a tile of drawing repeated side by side in both directions, as an SVG pattern whose units are the coordinates of the shape it paints (patternUnits="userSpaceOnUse").
RadialGradientPaintA radial gradient, in the coordinates of the shape it paints: the color of offset 0 is at the focal point, and the color of offset 1 on the circle of RadialGradientPaint.CenterX, RadialGradientPaint.CenterY and RadialGradientPaint.Radius. Outside the circle, the gradient spreads as SceneGradientPaint.Spread says.
SceneA drawing made of primitives (shapes, paths, texts, groups), independent of the output format. Charts and diagrams create it (ISceneSource.CreateScene); SvgSceneRenderer and the renderer of Meziantou.Framework.Imaging.VectorGraphics draw it.
SceneBlendPrimitiveA primitive that draws its first input over its second one with a blend mode: feBlend of SVG.
SceneBlurFilterA Gaussian blur, as the feGaussianBlur of SVG.
SceneCircleA circle.
SceneClipPathA clipping path made of shapes and texts (SceneElement.ClippingPath), as the clipPath of SVG: the element is drawn only inside the union of the shapes of its content.
SceneColorMatrixFilterA filter that gives each pixel a new color from its own one, as the feColorMatrix of SVG: the matrix has four rows, for the red, the green, the blue and the alpha of the result, and five columns, for the red, the green, the blue and the alpha of the pixel and a constant, with the values as fractions of one: R' = m0 R + m1 G + m2 B + m3 A + m4.
SceneColorMatrixPrimitiveA primitive that gives each pixel of its input a new color from its own one: feColorMatrix of SVG, with the matrix of SceneColorMatrixFilter.
SceneComponentTransferPrimitiveA primitive that maps each component of the colors of its input by a function of its own: feComponentTransfer of SVG.
SceneCompositePrimitiveA primitive that combines two inputs with an operator of Porter and Duff, their sum, or an arithmetic of their components: feComposite of SVG.
SceneConvolveMatrixPrimitiveA primitive that computes each pixel from the pixels around it with a matrix of weights: feConvolveMatrix of SVG.
SceneDiffuseLightingPrimitiveA primitive that lights the surface whose height is the alpha of its input with a matte light: feDiffuseLighting of SVG. The result is opaque.
SceneDisplacementMapPrimitiveA primitive that moves the pixels of its input by the colors of a map: feDisplacementMap of SVG.
SceneDistantLightA light infinitely far away, whose rays are parallel: feDistantLight of SVG.
SceneDropShadowFilterA shadow drawn under the element: its shape, blurred, moved and filled with a color, as the feDropShadow of SVG.
SceneDropShadowPrimitiveA primitive that draws its input over its shadow: feDropShadow of SVG.
SceneElementAn element of a Scene.
SceneFilterAn effect applied to what an element draws (SceneElement.Filter): SceneBlurFilter, SceneDropShadowFilter, SceneColorMatrixFilter, or a graph of SVG filter primitives (SceneFilterGraph).
SceneFilterGraphA filter made of primitives that read the drawing of the element, its alpha, and each other's results, as an SVG filter element whose units are the user space.
SceneFilterPrimitiveA primitive of a SceneFilterGraph: an element fe* of an SVG filter.
SceneFloodPrimitiveA primitive that fills its subregion with a color: feFlood of SVG.
SceneFontCollectionThe fonts of a scene: the faces of one or more families. The layout measures each text with them (FontFaceTextMeasurer), and the renderers draw it with them (Scene.Fonts), so each text is measured and drawn with the same font.
SceneFontFaceA face of a font file (TrueType, OpenType, WOFF, WOFF2 or a collection), for the texts of a scene. Add it to a SceneFontCollection: the layout measures the texts with it and every renderer draws them with it.
SceneGaussianBlurPrimitiveA primitive that blurs its input: feGaussianBlur of SVG.
SceneGradientPaintA gradient: LinearGradientPaint or RadialGradientPaint.
SceneGroupA group of elements, with a clip rectangle or path, and the transform, the opacity and the effects of an element, that apply to all of them.
SceneImageA raster image (PNG, JPEG, GIF or WebP), stretched to fill a rectangle, or fitted in it (SceneImage.Alignment).
SceneImagePrimitiveA primitive whose result is the drawing of an element: feImage of SVG, of an image or of an element.
SceneLightSourceThe light of a SceneDiffuseLightingPrimitive or a SceneSpecularLightingPrimitive: SceneDistantLight, ScenePointLight or SceneSpotLight.
SceneLineA straight line segment.
SceneMarkerA drawing placed on the vertices of a path or a line, such as an arrowhead, as an SVG marker (ScenePath.MarkerStart, ScenePath.MarkerMid, ScenePath.MarkerEnd).
SceneMaskAn opacity mask (SceneElement.Mask): the element is drawn where its content is, with the opacity its content gives, as the mask of SVG. Outside of the content, nothing is drawn.
SceneMergePrimitiveA primitive that draws its inputs over each other, the first one at the bottom: feMerge of SVG.
SceneMorphologyPrimitiveA primitive that makes the shapes of its input thinner or thicker: feMorphology of SVG.
SceneOffsetPrimitiveA primitive that moves its input: feOffset of SVG.
ScenePaintHow a shape is painted: SolidPaint, LinearGradientPaint, RadialGradientPaint, PatternPaint or ContextPaint.
ScenePathA path of lines, curves and arcs.
ScenePointLightA light at a point, that shines in every direction: fePointLight of SVG.
SceneRectangleAn axis-aligned rectangle.
SceneShapeAn element that is filled or stroked.
SceneSpecularLightingPrimitiveA primitive that lights the surface whose height is the alpha of its input with a shiny light: feSpecularLighting of SVG. The result is the highlights, to add to the drawing.
SceneSpotLightA light at a point, that shines toward another point: feSpotLight of SVG.
SceneTextA line of text, positioned by its baseline.
SceneTextSpanA part of a text with its own style (SceneText.Spans): what it does not set is the style of the text. The spans are drawn one after the other on the baseline of the text, unless they are moved (SceneTextSpan.X, SceneTextSpan.Y, SceneTextSpan.Dx, SceneTextSpan.Dy, SceneTextSpan.BaselineShift).
SceneTilePrimitiveA primitive that repeats the subregion of its input over its own subregion: feTile of SVG.
SceneTransferFunctionA function of a component of a SceneComponentTransferPrimitive: feFuncR, feFuncG, feFuncB or feFuncA of SVG. It applies to the colors without their alpha, from 0 to 1, and its result is clamped to that range.
SceneTurbulencePrimitiveA primitive that fills its subregion with Perlin noise: feTurbulence of SVG.
SceneUseAn element that draws another element again, as an SVG use: the SVG writes the element once and refers to it, the other renderers draw it again.
SceneViewBoxThe view box of a group (SceneGroup.ViewBox), as a nested SVG svg element: a rectangle of the coordinates of the children, mapped to a viewport of the coordinates of the group, which cuts what is outside of it.
SolidPaintA paint of a single color.
SvgRenderOptionsThe options of SvgSceneRenderer.
SvgSceneRendererWrites a Scene as SVG.
TextFittingFits texts in the space a layout gives them: truncation with an ellipsis, and wrapping on several lines.
TextMeasurerExtensionsExtension methods for ITextMeasurer.

Structs

NameDescription
PathCommandA command of a PathData. The fields that do not apply to its kind are 0.
PathPointA point of a path, with the direction of the path there (PathData.GetPointAtLength).
SceneBoundsA rectangle.
SceneColorAn sRGB color with an alpha channel, 8 bits per channel.
SceneFilterInputWhat a primitive of a SceneFilterGraph reads, as the SVG in and in2 attributes.
SceneFontThe size, the weight, the style and the family of a text.
SceneFontRunA part of a text that one face draws (SceneFontCollection.GetRuns).
SceneGradientStopA color stop of a gradient.
SceneTransformAn affine transform: a point (x, y) becomes (A x + C y + E, B x + D y + F).
TextMetricsThe dimensions of a line of text.

Interfaces

NameDescription
ISceneSourceA drawing that lays itself out into a Scene, such as a chart or a diagram.
ITextMeasurerMeasures text, so the layout of a chart or a diagram (margins, label rotation, truncation, wrapping) fits the font that draws it.

Enums

NameDescription
PathCommandKindThe kind of a PathCommand.
SceneAspectRatioHow a view box keeps its proportions in its viewport (SceneViewBox.Alignment), as the SVG preserveAspectRatio.
SceneBlendModeHow an element is blended with what is drawn under it (SceneElement.BlendMode), as the mix-blend-mode of CSS and the blend modes of PDF.
SceneColorChannelA component of a color: the xChannelSelector and yChannelSelector of feDisplacementMap.
SceneCompositeOperatorHow a SceneCompositePrimitive combines its inputs A (in) and B (in2): the operator of feComposite.
SceneFillRuleWhich regions of a path with crossing or nested contours are inside.
SceneFilterColorSpaceThe colors a primitive of a SceneFilterGraph computes with, as the SVG color-interpolation-filters property.
SceneFilterEdgeModeWhat a primitive of a SceneFilterGraph reads beyond the edges of its input, as the SVG edgeMode attribute.
SceneFilterInputKindWhat a primitive of a SceneFilterGraph reads (SceneFilterInput.Kind).
SceneGradientSpreadHow a gradient paints beyond its ends (SceneGradientPaint.Spread), as the spreadMethod of SVG.
SceneLineCapThe shape of the ends of an open outline.
SceneLineJoinThe shape of the corners of an outline.
SceneMarkerOrientationHow a marker is turned (SceneMarker.Orientation).
SceneMarkerUnitsThe units of the content of a marker (SceneMarker.Units).
SceneMaskModeWhat the content of a mask gives the opacity by (SceneMask.Mode).
SceneMorphologyOperatorWhether a SceneMorphologyPrimitive makes the shapes thinner or thicker: the operator of feMorphology.
ScenePaintOrderThe order in which a shape or a text paints its fill, its stroke and its markers, as the SVG paint-order property (SceneShape.PaintOrder). What is painted later is over what is painted before.
SceneTextAnchorWhere a text is anchored horizontally, relative to its position.
SceneTextBaselineThe baseline of a text that is on its y coordinate, as the SVG dominant-baseline property (SceneText.Baseline). The renderers compute it from the metrics of the font of each span: its ascent, its descent and its x-height (half its ascent when the font does not give it).
SceneTextDecorationsThe lines drawn with a text (SceneText.Decorations).
SceneTextDirectionThe direction a text is written in (SceneText.Direction), as the SVG direction property.
SceneTextLengthAdjustHow a text is stretched or compressed to its length (SceneText.TextLength), as the SVG lengthAdjust attribute.
SceneTransferFunctionKindThe kind of a SceneTransferFunction: the type of feFuncR, feFuncG, feFuncB and feFuncA.
SceneTurbulenceTypeThe noise of a SceneTurbulencePrimitive: the type of feTurbulence.