Table of Contents

Method FromRectangle

Namespace
LMKit.Graphics.Geometry
Assembly
LM-Kit.NET.dll

FromRectangle(Rectangle)

Creates a quadrilateral from a Rectangle.

public static Quadrilateral FromRectangle(Rectangle r)

Parameters

r Rectangle

The rectangle to convert.

Returns

Quadrilateral

A new Quadrilateral matching r.

FromRectangle(Rectangle, double, Point)

Creates a quadrilateral by rotating a Rectangle about a given pivot point.

public static Quadrilateral FromRectangle(Rectangle r, double angleDegrees, Point pivot)

Parameters

r Rectangle

The rectangle to rotate.

angleDegrees double

Clockwise rotation angle in degrees.

pivot Point

The pivot point to rotate around.

Returns

Quadrilateral

A new Quadrilateral representing the rotated rectangle.

FromRectangle(double, double, double, double)

Creates a quadrilateral from rectangle parameters (left, top, width, height).

public static Quadrilateral FromRectangle(double left, double top, double width, double height)

Parameters

left double

The X-coordinate of the left edge.

top double

The Y-coordinate of the top edge.

width double

The rectangle width.

height double

The rectangle height.

Returns

Quadrilateral

A new axis-aligned Quadrilateral.

FromRectangle(double, double, double, double, double, Point)

Creates a quadrilateral from rectangle parameters and rotates it around a specified pivot point.

public static Quadrilateral FromRectangle(double left, double top, double width, double height, double angleDegrees, Point pivot)

Parameters

left double

The X-coordinate of the left edge.

top double

The Y-coordinate of the top edge.

width double

The rectangle width.

height double

The rectangle height.

angleDegrees double

Clockwise rotation angle in degrees.

pivot Point

The pivot point to rotate around.

Returns

Quadrilateral

A new Quadrilateral representing the rotated rectangle.