mGPlus API Reference  v1.4.0
A MiniGUI component which provides support for advanced 2D graphics functions
Functions
Worldtransform

Functions

MGPLUS_EXPORT MPStatus MGPlusSetWorldTransform (HGRAPHICS graphics, MPMatrix *matrix)
 Set the world transform of graphic. More...
 
MGPLUS_EXPORT MPStatus MGPlusWorldTransform (HGRAPHICS graphics, MPMatrix *matrix)
 Multi the special matrix with matrix of graphic. More...
 
MGPLUS_EXPORT MPStatus MGPlusGetWorldTransform (HGRAPHICS graphics, MPMatrix *matrix)
 Get the world transform of graphic. More...
 
MGPLUS_EXPORT MPStatus MGPlusResetWorldTransform (HGRAPHICS graphics)
 Reset the world transform of graphic. More...
 
MGPLUS_EXPORT MPStatus MGPlusTranslateWorldTransform (HGRAPHICS graphics, float dx, float dy)
 Translate the world transform of graphic. More...
 
MGPLUS_EXPORT MPStatus MGPlusScaleWorldTransform (HGRAPHICS graphics, float sx, float sy)
 Scale the world transform of graphic. More...
 
MGPLUS_EXPORT MPStatus MGPlusRotateWorldTransform (HGRAPHICS graphics, float angle)
 Rotate the world transform of graphic. More...
 
MGPLUS_EXPORT MPStatus MGPlusPathTransform (HPATH path)
 Transform the path using its matrix. More...
 

Detailed Description

MGPlus maintains some worldtransform defines and operations

Function Documentation

MPStatus MGPlusGetWorldTransform ( HGRAPHICS  graphics,
MPMatrix matrix 
)

Get the world transform of graphic.

This function sets the world transform of graphic, supported by mGPlus V1.2.1 or upper.

Parameters
graphicsThe MGPlusGraphics pointer.
matrixThe MPMatrix pointer.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusSetWorldTransform
MPStatus MGPlusPathTransform ( HPATH  path)

Transform the path using its matrix.

This function transforms the path using its matrix.

Parameters
pathThe matrix path.
Returns
if success return TRUE, else return FALSE.
MPStatus MGPlusResetWorldTransform ( HGRAPHICS  graphics)

Reset the world transform of graphic.

This function resets the world transform of graphic

Parameters
graphicsThe MGPlusGraphics pointer.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusSetWorldTransform
MPStatus MGPlusRotateWorldTransform ( HGRAPHICS  graphics,
float  angle 
)

Rotate the world transform of graphic.

This function rotates the world transform of graphic.

Parameters
graphicsThe MGPlusGraphics pointer.
angleThe rotation angle.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusSetWorldTransform
MPStatus MGPlusScaleWorldTransform ( HGRAPHICS  graphics,
float  sx,
float  sy 
)

Scale the world transform of graphic.

This function scales the world transform of graphic

Parameters
graphicsThe MGPlusGraphics pointer.
sxthe x scaling factor.
sythe y scaling factor.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusSetWorldTransform
MPStatus MGPlusSetWorldTransform ( HGRAPHICS  graphics,
MPMatrix matrix 
)

Set the world transform of graphic.

This function sets the world transform of graphic

Parameters
graphicsThe MGPlusGraphics pointer.
matrixThe MPMatrix pointer.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusSetWorldTransform
MPStatus MGPlusTranslateWorldTransform ( HGRAPHICS  graphics,
float  dx,
float  dy 
)

Translate the world transform of graphic.

This function translates the world transform of graphic

Parameters
graphicsThe MGPlusGraphics pointer.
dxThe translate x distance.
dyThe translate y distance.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusSetWorldTransform
MPStatus MGPlusWorldTransform ( HGRAPHICS  graphics,
MPMatrix matrix 
)

Multi the special matrix with matrix of graphic.

This function sets the world transform of graphic, supported by mGPlus V1.2.1 or upper.

Parameters
graphicsThe MGPlusGraphics pointer.
matrixThe MPMatrix pointer.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusSetWorldTransform