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

Functions

MGPLUS_EXPORT HPEN MGPlusPenCreate (int width, ARGB rgba)
 Create a pen. More...
 
MGPLUS_EXPORT MPStatus MGPlusPenSetColor (HPEN pen, ARGB rgba)
 Set the pen color. More...
 
MGPLUS_EXPORT MPStatus MGPlusPenSetJoinStyle (HPEN pen, LINE_JOIN_E line_join)
 Set the pen line join style. More...
 
MGPLUS_EXPORT MPStatus MGPlusPenSetCapStyle (HPEN pen, LINE_CAP_E line_cap)
 Set the pen line cap style. More...
 
MGPLUS_EXPORT MPStatus MGPlusPenSetDashes (HPEN pen, int dash_phase, const unsigned char *dash_list, int dash_len)
 Set the pen dashes. More...
 
MGPLUS_EXPORT MPStatus MGPlusPenSetWidth (HPEN pen, int width)
 Set the pen width. More...
 
MGPLUS_EXPORT MPStatus MGPlusPenDelete (HPEN pen)
 Delete a pen. More...
 

Detailed Description

MGPlus maintains some pen defines and operations

Function Documentation

HPEN MGPlusPenCreate ( int  width,
ARGB  rgba 
)

Create a pen.

This function creates a pen.

Parameters
widthThe width of the pen.
rgbaThe rgba of the pen.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusPenDelete
MPStatus MGPlusPenDelete ( HPEN  pen)

Delete a pen.

This function deletes a pen.

Parameters
penThe pen pointer.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusPenCreate
MPStatus MGPlusPenSetCapStyle ( HPEN  pen,
LINE_CAP_E  line_join 
)

Set the pen line cap style.

This function sets the pen line cap style.

Parameters
penThe pen.
line_joinThe line cap style of the pen.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusPenDelete
MPStatus MGPlusPenSetColor ( HPEN  pen,
ARGB  rgba 
)

Set the pen color.

This function sets the pen color.

Parameters
penThe pen.
rgbaThe rgba of the pen.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusPenDelete
MPStatus MGPlusPenSetDashes ( HPEN  pen,
int  dash_phase,
const unsigned char *  dash_list,
int  dash_len 
)

Set the pen dashes.

This function sets the pen dash line style.

Parameters
penThe pen.
dash_phaseThe dash phase of pen.
dash_listThe dash vector value.
dash_lenThe length of vector.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusPenDelete
MPStatus MGPlusPenSetJoinStyle ( HPEN  pen,
LINE_JOIN_E  line_cap 
)

Set the pen line join style.

This function sets the pen join style.

Parameters
penThe pen.
line_capThe line join style of the pen.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusPenDelete
MPStatus MGPlusPenSetWidth ( HPEN  pen,
int  width 
)

Set the pen width.

This function sets the pen width.

Parameters
penThe pen.
widthThe width of the pen.
Returns
Get Status, MP_GENERIC_ERROR indicates an error.
See also
MGPlusPenDelete