Table of Contents

Class Rectangle

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

Represents an operator that specifies drawing a simple, thick, or filled rectangle with the specified origin and size.

public class Rectangle : CanvasElement
Inheritance
Rectangle
Inherited Members

Properties

Color

Gets or sets the color of the rectangle.

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

Property Value

Scalar

LineType

Gets or sets a value specifying the line drawing algorithm used to draw the rectangle outline.

public LineFlags LineType { get; set; }

Property Value

LineFlags

Origin

Gets or sets the coordinates of the top-left corner of the rectangle.

public Point Origin { get; set; }

Property Value

Point

Shift

Gets or sets the number of fractional bits in the rectangle coordinates.

public int Shift { get; set; }

Property Value

int

Size

Gets or sets the size of the rectangle.

public Size Size { get; set; }

Property Value

Size

Thickness

Gets or sets the thickness of the rectangle outline, if positive. Otherwise, indicates that the rectangle should be filled.

public int Thickness { get; set; }

Property Value

int

Methods

GetRenderer()

Returns the rectangle drawing operation.

protected override Action<IplImage> GetRenderer()

Returns

Action<IplImage>

The Action<T> object that will be invoked to apply the drawing operation to the canvas bitmap during rendering.