ImagePrimitive Class

A primitive whose result is what a callback draws: feImage of SVG, of an image or of an element.

public sealed class ImagePrimitive : FilterPrimitive

Remarks

The callback draws in the coordinates of the drawing that is filtered, through the same transformation of the canvas, on a transparent image of the part of the subregion of the primitive that is computed (its canvas is that image): an image is drawn with DrawingCanvas.DrawImage, an element with its own draw calls. The result is in sRGB, whatever FilterPrimitive.ColorSpace says, and converted when a primitive in linear light reads it. It has no input: by default, its subregion is the region of the filter.

Inheritance
FilterPrimitive ImagePrimitive

Constructors

NameDescription
ImagePrimitive(DrawingAction)Initializes a new instance of the ImagePrimitive class.

ImagePrimitive(DrawingAction)

ImagePrimitive.cs

Initializes a new instance of the ImagePrimitive class.

public ImagePrimitive(DrawingAction drawing)

Parameters

drawing DrawingAction
The callback that draws the result. It runs each time the filter is applied, and must not retain the canvas.

Exceptions

ArgumentNullException
drawing is null.

Properties

NameDescription
DrawingGets the callback that draws the result.

Gets the callback that draws the result.

public DrawingAction Drawing { get; }

Property value

DrawingAction