Brush
Functions
- MGPLUS_EXPORT HBRUSH MGPlusBrushCreate (MPBrushType type)
- Create a brush.
- MGPLUS_EXPORT MPStatus MGPlusBrushDelete (HBRUSH brush)
- Delete a brush.
- MGPLUS_EXPORT MPStatus MGPlusSetSolidBrushColor (HBRUSH brush, ARGB rgba)
- Set color with solid brush.
- MPStatus MGPlusGetSolidBrushColor (HBRUSH brush, ARGB *rgba)
- Set color with solid brush.
- MGPLUS_EXPORT MPStatus MGPlusSetTextureBrushImage (HBRUSH brush, BITMAP *bitmap)
- Set image with texture brush.
- MGPLUS_EXPORT MPStatus MGPlusSetPathGradientBrushCenterPoint (HBRUSH brush, MPPOINT *point)
- Set the center point with path gradient brush.
- MGPLUS_EXPORT MPStatus MGPlusSetPathGradientBrushCenterColor (HBRUSH brush, ARGB rgba)
- Set the center point color with path gradient brush.
- MGPLUS_EXPORT MPStatus MGPlusSetPathGradientBrushSurroundColors (HBRUSH brush, ARGB *rgba, int count)
- Set the surround color with path gradient brush.
- MGPLUS_EXPORT MPStatus MGPlusSetPathGradientBrushSurroundRect (HBRUSH brush, RECT *rect)
- Set the single color rect with path gradient brush.
- MGPLUS_EXPORT MPStatus MGPlusSetLinearGradientBrushMode (HBRUSH brush, MPLinearGradientMode mode)
- Set the linear gradient brush mode.
- MGPLUS_EXPORT MPStatus MGPlusGetLinearGradientBrushMode (HBRUSH brush, MPLinearGradientMode *mode)
- Get the linear gradient brush mode.
- MGPLUS_EXPORT MPStatus MGPlusSetLinearGradientBrushRect (HBRUSH brush, RECT *rect)
- Set the rect of the linear gradient brush.
- MGPLUS_EXPORT MPStatus MGPlusSetLinearGradientBrushColors (HBRUSH brush, ARGB *colors, int count)
- Set the start color and end color with the linear gradient brush.
- MGPLUS_EXPORT MPStatus MGPlusSetLinearGradientBrushColorsEx (HBRUSH brush, ARGB *colors, int count, float *position)
- Set the start color and end color with the linear gradient brush, and every color with position info.
- MGPLUS_EXPORT int MGPlusLinearGradientBrushGetColorNumber (HBRUSH brush)
- get the linear gradient brush color number.
- MGPLUS_EXPORT MPStatus MGPlusLinearGradientBrushAddColor (HBRUSH brush, ARGB color, float position)
- Add the linear gradient brush color.
Detailed Description
MGPlus maintains some brush defines and operations
Function Documentation
Create a brush.
This function creates a brush.
- Parameters:
-
| type | The MPBrushType type. |
- Returns:
- , INVALID_HANDLE indicates an error.
- See also:
- MGPlusBrushDelete
Delete a brush.
This function deletes a brush.
- Parameters:
-
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.
- See also:
- MGPlusBrushCreate
Get the linear gradient brush mode.
This function gets the linear gradient brush mode.
- Parameters:
-
| brush | The bursh pointer. |
| mode | The linear gradient mode pointer. |
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.
- See also:
- MGPlusSetLinearGradientBrushMode
Set color with solid brush.
This function sets color with solid brush.
- Parameters:
-
| brush | The bursh pointer. |
| rgba | The color pointer. |
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.
MGPlusLinearGradientBrushAddColor |
( |
HBRUSH |
brush, |
|
|
ARGB |
color, |
|
|
float |
position | |
|
) |
| | |
Add the linear gradient brush color.
This function adds the linear gradient brush color, supported by mGPlus V1.2.1 or upper.
- Parameters:
-
| brush | The bursh pointer. |
| color | The linear graidnet brush's color. |
| position | The linear gradient brush's color position info. |
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.
MGPlusLinearGradientBrushGetColorNumber |
( |
HBRUSH |
brush |
) |
|
get the linear gradient brush color number.
This function get the linear gradient brush color number, supported by mGPlus V1.2.1 or upper.
- Parameters:
-
- Returns:
- Get Gradient color number.
MGPlusSetLinearGradientBrushColors |
( |
HBRUSH |
brush, |
|
|
ARGB * |
colors, |
|
|
int |
count | |
|
) |
| | |
Set the start color and end color with the linear gradient brush.
This function set the start color and end color with the linear gradient brush.
- Parameters:
-
| brush | The bursh pointer. |
| colors | The linear graidnet brush's color pointer. |
| count | The number of linear gradient brush's colors. |
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.
MGPlusSetLinearGradientBrushColorsEx |
( |
HBRUSH |
brush, |
|
|
ARGB * |
colors, |
|
|
int |
count, |
|
|
float * |
position | |
|
) |
| | |
Set the start color and end color with the linear gradient brush, and every color with position info.
This function set the start color and end color with the linear gradient brush.
- Parameters:
-
| brush | The bursh pointer. |
| colors | The linear graidnet brush's color pointer. |
| count | The number of linear gradient brush's colors. |
| position | The position info of linear gradient brush's colors. |
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.
Set the linear gradient brush mode.
This function sets the linear gradient brush mode.
- Parameters:
-
| brush | The bursh pointer. |
| mode | The linear gradient mode. |
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.
- See also:
- MGPlusGetLinearGradientBrushMode
MPStatus MGPlusSetLinearGradientBrushRect |
( |
HBRUSH |
brush, |
|
|
RECT * |
rect | |
|
) |
| | |
Set the rect of the linear gradient brush.
This function set the rect of the linear gradient brush.
- Parameters:
-
| brush | The bursh pointer. |
| rect | The linear gradient brush valid rect pointer. |
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.
Set the center point color with path gradient brush.
This function sets the center point color with path gradient brush.
- Parameters:
-
| brush | The bursh pointer. |
| rgba | The center point color. |
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.
- See also:
- MGPlusSetPathGradientBrushCenterPoint
Set the center point with path gradient brush.
This function sets the center point with path gradient brush.
- Parameters:
-
| brush | The bursh pointer. |
| point | The center point pointer. |
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.
- See also:
- MGPlusSetPathGradientBrushCenterColor
MPStatus MGPlusSetPathGradientBrushSurroundColors |
( |
HBRUSH |
brush, |
|
|
ARGB * |
rgba, |
|
|
int |
count | |
|
) |
| | |
Set the surround color with path gradient brush.
This function sets the center point color with path gradient brush.
- Parameters:
-
| brush | The bursh pointer. |
| rgba | The surround points color. |
| count | The surround color number. |
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.
- See also:
- MGPlusSetPathGradientBrushCenterColor
MPStatus MGPlusSetPathGradientBrushSurroundRect |
( |
HBRUSH |
brush, |
|
|
RECT * |
rect | |
|
) |
| | |
Set the single color rect with path gradient brush.
This function sets the single color rect with path gradient brush.
- Parameters:
-
| brush | The bursh pointer. |
| rect | The rect pointer. |
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.
- See also:
- MGPlusSetPathGradientBrushCenterColor
Set color with solid brush.
This function sets color with solid brush.
- Parameters:
-
| brush | The bursh pointer. |
| rgba | The color. |
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.
Set image with texture brush.
This function sets image with texture brush.
- Parameters:
-
| brush | The bursh pointer. |
| bitmap | The BITMAP pointer. |
- Returns:
- Get Status, MP_GENERIC_ERROR indicates an error.