CreateArc

From SIMboxWiki
Jump to navigation Jump to search

Description

Use the function CreateArc to create an arc shape.

Syntax

AGI_DECL HAGI WINAPI CreateArc( float fHRadius,
float fVRadius,
float fStartAng,
float fEndAng,
LPCSTR sName,
eGeomOrigin geomOrigin = goLeftBottom
);

Parameters

float fHRadius

[in] The horizontal radius.

float fVRadius

[in] The vertical radius.

float fStartAng

[in] The start angle of the arc.

float fEndAng

[in] The end angle of the arc.

LPCSTR sName

[in] The name of the AGI object.

eGeomOrigin geomOrigin

[in] The origin of the shape.

Return Value

The HAGI of the created object.

Zero if failed.

Remarks

The angle starts at the 12 o'clock postion and moves clockwise.

AngleStart.png

Example

// creating an arc AGI object
// this arc will have horizontal radius of 5, vertical radus of 10,
// it will starts at 12 O'clock and end at 9 O'clock,
// its center will be placed at the origin of its parent AGI object
_hArc = Agi::CreateArc(5, 10, 0, 270, "Arc", goCenter);