This documentation is for the old version. Go to the latest Graphics Mill docs

GdiGraphics.DrawRectangle Method (Pen, Single, Single, Single, Single)

Draws a rectangle.

Namespace: Aurigma.GraphicsMill.Drawing
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

Visual Basic
Public Sub DrawRectangle ( _
	pen As Pen, _
	x As Single, _
	y As Single, _
	width As Single, _
	height As Single _
)
C#
public void DrawRectangle(
	Pen pen,
	float x,
	float y,
	float width,
	float height
)

Parameters

pen

Type: Aurigma.GraphicsMill.Drawing.Pen

Pen object which is used to outline a rectangle.
x

Type: System.Single

X-coordinate of the top left corner of the rectangle.
y

Type: System.Single

Y-coordinate of the top left corner of the rectangle.
width

Type: System.Single

Width of the rectangle.
height

Type: System.Single

Height of the rectangle.

Remarks

To fill a rectangle, use FillRectangle(Brush, Single, Single, Single, Single) method.

All the coordinates are measured in units specified with Unit property.

See Also

Reference