IVectorImage

Description

interface Tinman.Engine.Drawing.IVectorImage

Derived from

IDisposable
IPathInfo

Extended by

VectorImage abstract

Base interface for classes that load 2D vector images and rasterize them to a pixel buffer.

Public / Methods

Rasterize


public method Rasterize → (2)

output in : ColorBuffer

[not-null]
The output color buffer. Use ISampleBuffer.SubBuffer to output to a sub-rectangle.

bounds opt : Box2F = default(Box2F)

The vector image bounds to rasterize into output in. If empty, the whole bounds are rasterized (i.e, from the coordinate origin to Size).

Rasterizes the vector image into the given color buffer.

Calling this method after the IVectorImage has been disposed is allowed, but will return silently without performing any rasterization.

Public / Attributes

Size


public attribute Size → (get)

value : Vec2F

The vector image width (Vec2F.X) and height (Vec2F.Y).

Returns the dimensions of the vector image.

The returned length values do not have any specific unit of measure. So consuming the aspect ratio (see IVectorImage.AspectRatio) may be favorable over consuming the width and height individually.

Extensions

Aspect​Ratio


public static method AspectRatio → ()

returns → float32

The aspect ratio, i.e. width divided by height.

Returns the aspect ratio of the vector image.