Render

Functions


Detailed Description

MGPlus maintains some render defines and operations


Function Documentation

MPStatus MGPlusDrawArc ( HGRAPHICS  graphics,
HPEN  pen,
float  x,
float  y,
float  width,
float  height,
float  startangle,
float  sweepangle 
)

Draw a arc on the graphic.

This function draws a arc on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
pen The draw pen.
x The x-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc.
y The y-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc.
width The width of the bounding rectangle for the ellipse.
height The height of the bounding rectangle for the ellipse.
startangle The start angle.
sweepangle specifies the angle, between the starting point (startangle) and the ending point of the arc.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawArcI
MPStatus MGPlusDrawArcI ( HGRAPHICS  graphics,
HPEN  pen,
int  x,
int  y,
int  width,
int  height,
float  startangle,
float  sweepangle 
)

Draw a arc on the graphic.

This function draws a arc on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
pen The draw pen.
x The x-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc.
y The y-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc.
width The width of the bounding rectangle for the ellipse.
height The height of the bounding rectangle for the ellipse.
startangle The start angle.
sweepangle Specifies the angle, between the starting point (startangle) and the ending point of the arc.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawArc
MPStatus MGPlusDrawBezier ( HGRAPHICS  graphics,
HPEN  pen,
float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3,
float  x4,
float  y4 
)

Draw a bezier on the graphic.

This function draws a bezier on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
pen The draw pen.
x1 The start x of bezier.
y1 The start y of bezier.
x2 The first control x of bezier.
y2 The first control y of bezier.
x3 The second control x of bezier.
y3 The second control y of bezier.
x4 The end x of bezier.
y4 The end y of bezier.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawBezierI
MPStatus MGPlusDrawBezierI ( HGRAPHICS  graphics,
HPEN  pen,
int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3,
int  x4,
int  y4 
)

Draw a bezier on the graphic.

This function draws a bezier on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
pen The draw pen.
x1 The start x of bezier.
y1 The start y of bezier.
x2 The first control x of bezier.
y2 The first control y of bezier.
x3 The second control x of bezier.
y3 The second control y of bezier.
x4 The end x of bezier.
y4 The end y of bezier.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawBezier
MPStatus MGPlusDrawEllipse ( HGRAPHICS  graphics,
HPEN  pen,
float  cx,
float  cy,
float  rx,
float  ry 
)

Draw a ellipse on the graphic.

This function draws a ellipse on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
pen The draw pen.
cx The X position of the center of the ellipse.
cy The Y position of the center of the ellipse.
rx The x-radius of the ellipse.
ry The y-radius of the ellipse.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawEllipseI
MPStatus MGPlusDrawEllipseI ( HGRAPHICS  graphics,
HPEN  pen,
int  cx,
int  cy,
int  rx,
int  ry 
)

Draw a ellipse on the graphic.

This function draws a ellipse on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
pen The draw pen.
cx The X position of the center of the ellipse.
cy The Y position of the center of the ellipse.
rx The x-radius of the ellipse.
ry The y-radius of the ellipse.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawEllipse
MPStatus MGPlusDrawImage ( HGRAPHICS  graphics,
int  n_index,
int  x,
int  y,
int  w,
int  h 
)

Draw the image with on the graphic.

This function draws the image with a series of points on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
n_index The graphic's inner resource index.
x The x coordinate of the upper-left corner of the box.
y The y coordinate of the upper-left corner of the box.
w The width of the box. Can be zero, means the width or the height will be equal to the width or the height of The BITMAP object.
h The height of the box. Can be zero, means the width or the height will be equal to the width or the height of the BITMAP object.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawImageWithPath
MPStatus MGPlusDrawImageWithPath ( HGRAPHICS  graphics,
int  n_index,
HPATH  path 
)

Draw the image with a path on the graphic.

This function draws the image with a path on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
n_index The graphic's inner resource index.
path The path need to be filled.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawImageWithPoints
MPStatus MGPlusDrawImageWithPoints ( HGRAPHICS  graphics,
int  n_index,
const MPPOINT point,
int  count 
)

Draw the image with a series of points on the graphic.

This function draws the image with a series of points on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
n_index The image index.
point The points pointer.
count The points count.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawImageWithPath
MPStatus MGPlusDrawLine ( HGRAPHICS  graphics,
HPEN  pen,
float  x1,
float  y1,
float  x2,
float  y2 
)

Draw a line on the graphic.

This function draws a line on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
pen The draw pen.
x1 The start x of line.
y1 The start y of line.
x2 The end x of line.
y2 The end y of line.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawLineI
MPStatus MGPlusDrawLineI ( HGRAPHICS  graphics,
HPEN  pen,
int  x1,
int  y1,
int  x2,
int  y2 
)

Draw a line on the graphic.

This function draws a line on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
pen The draw pen.
x1 The start x of line
y1 The start y of line.
x2 The end x of line.
y2 The end y of line.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawLine
MPStatus MGPlusDrawPath ( HGRAPHICS  graphics,
HPEN  pen,
HPATH  path 
)

Draw the path with a pen on the graphic.

This function draws the path with a pen on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
pen The draw pen.
path The path need to be drew.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusFillPath
MPStatus MGPlusDrawRectangle ( HGRAPHICS  graphics,
HPEN  pen,
float  x,
float  y,
float  width,
float  height 
)

Draw a rectangle on the graphic.

This function draws a rectangle on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
pen The draw pen.
x The left x of the rectangle.
y The top y of the rectangle.
width The width of the rectangle.
height The height of the rectangle.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawRectangleI
MPStatus MGPlusDrawRectangleI ( HGRAPHICS  graphics,
HPEN  pen,
int  x,
int  y,
int  width,
int  height 
)

Draw a rectangle on the graphic.

This function draws a rectangle on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
pen The draw pen.
x The left x of the rectangle.
y The top y of the rectangle.
width The width of the rectangle.
height The height of the rectangle.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawRectangle
MPStatus MGPlusDrawRoundRectEx ( HGRAPHICS  graphics,
HPEN  pen,
float  x,
float  y,
float  width,
float  height,
float  rx,
float  ry 
)

Draw a roundrect on the graphic.

This function draws a roundrect on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
pen The draw pen.
x The left x of the rectangle.
y The top y of the rectangle.
width The width of the rectangle.
height The height of the rectangle.
rx The x-radius of round rect arc.
ry The y-radius of round rect arc.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawRoundRectI
MPStatus MGPlusDrawRoundRectIEx ( HGRAPHICS  graphics,
HPEN  pen,
int  x,
int  y,
int  width,
int  height,
int  rx,
int  ry 
)

Draw a roundrect on the graphic.

This function draws a roundrect on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
pen The draw pen.
x The left x of the rectangle.
y The top y of the rectangle.
width The width of the rectangle.
height The height of the rectangle.
rx The x-radius of round rect arc.
ry The y-radius of round rect arc.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawRectangle
MPStatus MGPlusFillArc ( HGRAPHICS  graphics,
HBRUSH  brush,
float  x,
float  y,
float  width,
float  height,
float  startangle,
float  sweepangle 
)

Fill a arc on the graphic.

This function fills a arc on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
brush The fill brush.
x The x-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc.
y The y-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc.
width The width of the bounding rectangle for the ellipse.
height The height of the bounding rectangle for the ellipse.
startangle The start angle.
sweepangle Specifies the angle, between the starting point (startangle) and the ending point of the arc.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusFillArcI
MPStatus MGPlusFillArcI ( HGRAPHICS  graphics,
HBRUSH  brush,
int  x,
int  y,
int  width,
int  height,
float  startangle,
float  sweepangle 
)

Fill a arc on the graphic.

This function fills a arc on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
brush The fill brush.
x The x-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc.
y The y-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc.
width The width of the bounding rectangle for the ellipse.
height The height of the bounding rectangle for the ellipse.
startangle The start angle.
sweepangle Specifies the angle, between the starting point (startangle) and the ending point of the arc.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusFillArc
MPStatus MGPlusFillBezier ( HGRAPHICS  graphics,
HBRUSH  brush,
float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3,
float  x4,
float  y4 
)

Fill a bezier on the graphic.

This function fills a bezier on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
brush The fill brush.
x1 The start x of bezier.
y1 The start y of bezier.
x2 The first control x of bezier.
y2 The first control y of bezier.
x3 The second control x of bezier.
y3 The second control y of bezier.
x4 The end x of bezier.
y4 The end y of bezier.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusFillBezierI
MPStatus MGPlusFillBezierI ( HGRAPHICS  graphics,
HBRUSH  brush,
int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3,
int  x4,
int  y4 
)

Fill a bezier on the graphic.

This function fills a bezier on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
brush The fill brush.
x1 The start x of bezier.
y1 The start y of bezier.
x2 The first control x of bezier.
y2 The first control y of bezier.
x3 The second control x of bezier.
y3 The second control y of bezier.
x4 The end x of bezier.
y4 The end y of bezier.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusFillBezier
MPStatus MGPlusFillEllipse ( HGRAPHICS  graphics,
HBRUSH  brush,
float  cx,
float  cy,
float  rx,
float  ry 
)

Fill a ellipse on the graphic.

This function fills a ellipse on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
brush The fill brush.
cx The X position of the center of the ellipse.
cy The Y position of the center of the ellipse.
rx The x-radius of the ellipse.
ry The y-radius of the ellipse.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusFillEllipseI
MPStatus MGPlusFillEllipseI ( HGRAPHICS  graphics,
HBRUSH  brush,
int  cx,
int  cy,
int  rx,
int  ry 
)

Draw a ellipse on the graphic.

This function draws a ellipse on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
brush The fill brush.
cx The X position of the center of the ellipse.
cy The Y position of the center of the ellipse.
rx The x-radius of the ellipse.
ry The y-radius of the ellipse.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusFillEllipse
MPStatus MGPlusFillPath ( HGRAPHICS  graphics,
HBRUSH  brush,
HPATH  path 
)

Fill the path with a brush on the graphic.

This function fills the path with a brush on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
brush The fill brush.
path The path need to be filled.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusDrawPath
MGPLUS_EXPORT MPStatus MGPlusFillRectangle ( HGRAPHICS  graphics,
HBRUSH  brush,
float  x,
float  y,
float  width,
float  height 
)

Draw a rectangle on the graphic.

This function draws a rectangle on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
brush The fill brush.
x The left x of the rectangle.
y The top y of the rectangle.
width The width of the rectangle.
height The height of the rectangle.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusFillRectangleI
MGPLUS_EXPORT MPStatus MGPlusFillRectangleI ( HGRAPHICS  graphics,
HBRUSH  brush,
int  x,
int  y,
int  width,
int  height 
)

Draw a rectangle on the graphic.

This function draws a rectangle on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
brush The fill brush.
x The left x of the rectangle.
y The top y of the rectangle.
width The width of the rectangle.
height The height of the rectangle.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusFillRectangle
MPStatus MGPlusFillRoundRectEx ( HGRAPHICS  graphics,
HBRUSH  brush,
float  x,
float  y,
float  width,
float  height,
float  rx,
float  ry 
)

Draw a round rect on the graphic.

This function draws a round rect on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
brush The fill brush.
x The left x of the rectangle.
y The top y of the rectangle.
width The width of the rectangle.
height The height of the rectangle.
rx The x-radius of round rect arc.
ry The y-radius of round rect arc.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusFillRoundRectI
MPStatus MGPlusFillRoundRectIEx ( HGRAPHICS  graphics,
HBRUSH  brush,
int  x,
int  y,
int  width,
int  height,
int  rx,
int  ry 
)

Draw a round rect on the graphic.

This function draws a round rect on the graphic.

Parameters:
graphics The MGPlusGraphics pointer.
brush The fill brush.
x The left x of the rectangle.
y The top y of the rectangle.
width The width of the rectangle.
height The height of the rectangle.
rx The x-radius of round rect arc.
ry The y-radius of round rect arc.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusFillRoundRect
MPStatus MGPlusGetImageAlpha ( HGRAPHICS  graphics,
int *  alpha 
)

Get image alpha of graphic.

This function get the image alpha of graphic.

Parameters:
graphics The MGPlusGraphics pointer.
alpha The image alpha.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusSetImageAlpha
MPStatus MGPlusGraphicLoadBitmap ( HGRAPHICS  graphics,
int  n_index,
PBITMAP  p_bitmap 
)

Load the p_bitmap to graphic's inner resource.

This function loads the p_bitmap to graphic's inner resource.

Parameters:
graphics The MGPlusGraphics pointer.
n_index The resource number.
p_bitmap The bitmap need to be drew.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusGraphicLoadBitmapFromFile
MPStatus MGPlusGraphicLoadBitmapFromFile ( HGRAPHICS  graphics,
int  n_index,
char *  file 
)

Load the file to graphic's inner resource.

This function loads the file to graphic's inner resource.

Parameters:
graphics The MGPlusGraphics pointer.
n_index The resource number.
file The bitmap path.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusGraphicLoadBitmap
MPStatus MGPlusGraphicUnLoadBitmap ( HGRAPHICS  graphics,
int  n_index 
)

UnLoad the p_bitmap to graphic's inner resource.

get the p_bitmap to graphic's inner resource.

This function unloads the p_bitmap to graphic's inner resource.

Parameters:
graphics The MGPlusGraphics pointer.
n_index The resource number.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusGraphicLoadBitmap

This function get the p_bitmap to graphic's inner resource.

Parameters:
graphics The MGPlusGraphics pointer.
n_index The resource number.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusGraphicLoadBitmap
MPStatus MGPlusSetClipPath ( HGRAPHICS  graphics,
HPATH  path 
)

Set the path as a clip on the graphic.

This function set the path as a clip on the graphic, supported by mGPlus V1.2.1 or upper.

Parameters:
graphics The MGPlusGraphics pointer.
path The clip path.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusFillPath
MPStatus MGPlusSetImageAlpha ( HGRAPHICS  graphics,
int  alpha 
)

Set image alpha of graphic.

This function set the image alpha of graphic.

Parameters:
graphics The MGPlusGraphics pointer.
alpha The image alpha.
Returns:
Get Status, MP_GENERIC_ERROR indicates an error.
See also:
MGPlusGetImageAlpha
Generated on Wed Apr 27 09:48:11 2011 for mGPlus V1.2.4 API Reference by  doxygen 1.6.3