Table of Contents

Class CreateCanvas

Namespace
Bonsai.Vision.Drawing
Assembly
Bonsai.Vision.dll

Represents an operator that creates an empty canvas using the specified size and pixel format.

public class CreateCanvas : Source<Canvas>
Inheritance
CreateCanvas
Inherited Members

Properties

Channels

Gets or sets the number of channels in the canvas.

public int Channels { get; set; }

Property Value

int

Color

Gets or sets the background color used to initialize all pixels in the canvas. If not specified, the bitmap memory will be allocated when rendering the canvas, but will not be initialized.

[Range(0, 255)]
[Precision(0, 1)]
[TypeConverter(typeof(BgraScalarConverter))]
public Scalar? Color { get; set; }

Property Value

Scalar?

Depth

Gets or sets the bit depth of individual pixels in the canvas.

public IplDepth Depth { get; set; }

Property Value

IplDepth

Size

Gets or sets the size of the canvas.

public Size Size { get; set; }

Property Value

Size

Methods

Generate()

Generates an observable sequence that contains a single empty canvas with the specified size and pixel format.

public override IObservable<Canvas> Generate()

Returns

IObservable<Canvas>

A sequence containing a single instance of the Canvas class representing an empty canvas with no drawing operators.

Generate<TSource>(IObservable<TSource>)

Generates an observable sequence of canvas objects using the specified size and pixel format, and where each canvas is emitted only when an observable sequence emits a notification.

public IObservable<Canvas> Generate<TSource>(IObservable<TSource> source)

Parameters

source IObservable<TSource>

The sequence containing the notifications used for emitting new canvas objects.

Returns

IObservable<Canvas>

A sequence of Canvas objects where each element represents an empty canvas with no drawing operators.

Type Parameters

TSource

The type of the elements in the source sequence.