setaspectratio

This function is used to set current aspect ratio.

void setaspectratio(
	float xasp,
	float yasp
);

Parameters

xasp

The x aspect factor. For example, draw a rectangle with a width of 100, and the actual drawing width is 100 * xasp.

yasp

The y aspect factor. For example, draw a rectangle with a height of 100, and the actual drawing height is 100 * yasp.

Return Value

None

Remarks

If the aspect radio is negative, you can flip the axes. For example, after performing setaspectratio(1, -1), you can make the y axis positive.

Examples

None

(贡献者:Krissi  编辑