Sign in Join
FPDoc Onlineexperiment

RotateRect function

In unit GraphMath

Rotates a rectangle with the specified dimensions by the specified angle (in radians).

Declaration

pascal
function RotateRect(AWidth: Integer; AHeight: Integer; AAngle: Double)
: TRect

Arguments

AWidth

Width for the rectangle.

AHeight

Height for the rectangle.

AAngle

Rotation angle in radians.

Function result

The smallest TRect which contains the rotated rectangle.

Description

Rotates the rectangle (0, 0, AWidth, AHeight) around its top-left corner (0,0) by the angle in AAngle (in radians). Note that y points downwards.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.