MGPlus maintains some path defines and operations
MPStatus MGPlusPathAddArc | ( | HPATH | path, | |
float | cx, | |||
float | cy, | |||
float | rx, | |||
float | ry, | |||
float | startangle, | |||
float | sweepangle | |||
) |
Add a arc to a path.
This function adds a arc to a path.
path | The path pointer. | |
cx | The x position of the center of ellipse that contains the arc. | |
cy | The y position of the center of ellipse that contains the arc. | |
rx | The x-radius of the ellipse. | |
ry | The y-radius of the ellipse. | |
startangle | The start angle. | |
sweepangle | The specifies the angle, between the starting point (startangle) |
MPStatus MGPlusPathAddArcI | ( | HPATH | path, | |
int | cx, | |||
int | cy, | |||
int | rx, | |||
int | ry, | |||
int | startangle, | |||
int | sweepangle | |||
) |
Add a arc to a path.
This function adds a arc to a path.
path | The path pointer. | |
cx | The x position of the center of ellipse that contains the arc. | |
cy | The y position of the center of ellipse that contains the arc. | |
rx | The x-radius of the ellipse. | |
ry | The y-radius of the ellipse. | |
startangle | The start angle. | |
sweepangle | The specifies the angle, between the starting point(startangle) |
MPStatus MGPlusPathAddBezier | ( | HPATH | path, | |
float | x1, | |||
float | y1, | |||
float | x2, | |||
float | y2, | |||
float | x3, | |||
float | y3, | |||
float | x4, | |||
float | y4 | |||
) |
Add a bezier to the path .
This function adds a bezier to the path.
path | The path pointer. | |
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. |
MPStatus MGPlusPathAddBezierI | ( | HPATH | path, | |
int | x1, | |||
int | y1, | |||
int | x2, | |||
int | y2, | |||
int | x3, | |||
int | y3, | |||
int | x4, | |||
int | y4 | |||
) |
Add a bezier to the path .
This function adds a bezier to the path.
path | The path pointer. | |
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. |
Add a curve to a path.
This function adds a curve to a path.
path | The path pointer. | |
points | The points pointer. | |
count | The points count. |
MPStatus MGPlusPathAddEllipse | ( | HPATH | path, | |
float | cx, | |||
float | cy, | |||
float | rx, | |||
float | ry, | |||
BOOL | clockwise | |||
) |
Add a ellipse to a path.
This function adds a ellipse to a path.
path | The path pointer. | |
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. | |
clockwise | The direction, if TRUE, it is clockwise, else counter-clockwise. |
Add a ellipse to a path.
This function adds a ellipse to a path.
path | The path pointer. | |
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. | |
clockwise | The direction if TRUE, it is clockwise, else counter-clockwise. |
Add a line to a path.
This function adds a line to a path.
path | The path pointer. | |
x1 | The start x of the line. | |
y1 | The start y of the line. | |
x2 | The end x of the line. | |
y2 | The end y of the line. |
Add a line to a path.
This function adds a line to a path.
path | The path pointer. | |
x1 | The start x of the line. | |
y1 | The start y of the line. | |
x2 | The end x of the line. | |
y2 | The end y of the line. |
Add a series lines to a path.
This function adds a series lines to a path.
path | The path pointer. | |
points | The points pointer. | |
count | The number of points. |
copy a path to the other path.
This function copies a path to the other path.
path | The dst path pointer. | |
add_path | The src path pointer. |
Add a rectangle to the path.
This function adds a rectangle to the path.
path | The MGPlusPath pointer. | |
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. |
Add a rectangle to the path.
This function adds a rectangle to the path.
path | The path pointer. | |
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. |
MPStatus MGPlusPathAddRoundRectEx | ( | HPATH | path, | |
int | x, | |||
int | y, | |||
int | width, | |||
int | height, | |||
int | rx, | |||
int | ry | |||
) |
Add a round rect to the path .
This function adds a bezier to the path.
path | The path pointer. | |
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 radius width of round rect arc. | |
ry | The radius height of round rect arc. |
MPStatus MPStatus MGPlusPathArcto | ( | HPATH | path, | |
double | x1, | |||
double | y1, | |||
double | x2, | |||
double | y2, | |||
double | radius | |||
) |
Add a arc to a path and two tangent line of arc.
This function add a arc to a path and two tangent line of arc, first line through subpath last vectors to (x1, y1), second line through one arc point to (x2, y2). supported by mGPlus V1.2.1 or upper.
---------(last vector) ---- (x1,y1) ---- (point of tangent).
arc
|(point of tangent). | | (x2,y2)
path | The path pointer. | |
x1 | The x coordinat of first point . | |
y1 | The y coordinat of first point . | |
x2 | The x coordinat of second point . | |
y2 | The y coordinat of second point . | |
radius | The arc radius. |
Add a arc to a path and two tangent line through subpath last vectors, (x1, y1), (x2, y2).
This function add a arc to a path and two tangent line through subpath last vectors, (x1, y1), (x2, y2), supported by mGPlus V1.2.1 or upper.
path | The path pointer. | |
x1 | The x coordinat of first point . | |
y1 | The y coordinat of first point . | |
x2 | The x coordinat of second point . | |
y2 | The y coordinat of second point . | |
radius | The arc radius. |
MPStatus MGPlusPathBezierto | ( | HPATH | path, | |
float | x1, | |||
float | y1, | |||
float | x2, | |||
float | y2, | |||
float | x3, | |||
float | y3 | |||
) |
Add a bezier curve to the last vector.
This function adds a bezier curve to the last vector, supported by mGPlus V1.2.1 or upper.
path | The MGPlusPath pointer. | |
x1 | The first control point x coordinate. | |
y1 | The first control point y coordinate. | |
x2 | The second control point x coordinate. | |
y2 | The second control point y coordinate. | |
x3 | The last point x coordinate. | |
y3 | The last point y coordinate. |
Add a bezier curve to the last vector.
This function adds a bezier curve to the last vector, supported by mGPlus V1.2.1 or upper.
path | The MGPlusPath pointer. | |
x1 | The first control point x coordinate. | |
y1 | The first control point y coordinate. | |
x2 | The second control point x coordinate. | |
y2 | The second control point y coordinate. | |
x3 | The last point x coordinate. | |
y3 | The last point y coordinate. |
Close the current sub path.
This function closes the current sub path.
path | The path pointer. |
HPATH MGPlusPathCreate | ( | MPFillMode | brushMode | ) |
Create a path.
This function creates a path, and return the HPATH.
brushMode | The path filled mode. |
Delete the HPATH.
This function deletes the path.
path | The path need to be deleted. |
Get the key points count of the path.
This function gets the key points count of the path.
path | The path pointer. | |
count | The path count pointer. |
Get the key points coor of the path.
This function gets the key points coor of the path.
path | The path pointer. | |
count | The path count pointer. | |
pt | The path point coor pointer. |
Get the special path's transform matrix .
This funciton gets the special path's transform matrix, supported by mGPlus V1.2.1 or upper.
path | The path. | |
matrix | The translate matrix. |
Get the special idx vertex of the path.
This function gets the key points count of the path.
path | The path pointer. | |
idx | The vertex idx. | |
x | The pointer of get vertex's x coord . | |
y | The pointer of get vertex's y coord . | |
cmd | The vertex cmd type of point. |
Line the path to a new point.
This function lines the path to a new point.
path | The MGPlusPath pointer. | |
x | The left x of the point. | |
y | The top y of the point. |
Line the path to a new point.
This function lines the path to a new point.
path | The MGPlusPath pointer. | |
x | The left x of the point. | |
y | The top y of the point. |
Move the path to a new point.
This function moves the path to a new point.
path | The MGPlusPath pointer. | |
x | The left x of the point. | |
y | The top y of the point. |
Move the path to a new point.
This function moves the path to a new point.
path | The MGPlusPath pointer. | |
x | The left x of the point. | |
y | The top y of the point. |
Add a quadratic curve to the last vector.
This function adds a quadratic curve to the last vector supported by mGPlus V1.2.1 or upper.
path | The MGPlusPath pointer. | |
x1 | The control point x coordinate. | |
y1 | The control point y coordinate. | |
x2 | The last point x coordinate. | |
y2 | The last point y coordinate. |
Add a quadratic curve to the last vector.
This function adds a quadratic curve to the last vector supported by mGPlus V1.2.1 or upper.
path | The MGPlusPath pointer. | |
x1 | The control point x coordinate. | |
y1 | The control point y coordinate. | |
x2 | The last point x coordinate. | |
y2 | The last point y coordinate. |
Reset the path.
This function resets the path.
path | The path need to be reset. |
Reset the transform matrix of the special path.
path | The operate path. |
Scale the special path.
path | path. | |
angle | The rotation angle. |
Transform the special path to rotating around the point.
path | The path. | |
pt | The translate center point. | |
angle | The the rotation angle. |
Scale the special path.
path | The operate path. | |
sx | The x scaling factor. | |
sy | The y scaling factor. |
MPStatus MGPlusPathSetAllOrientation | ( | HPATH | path, | |
MPOrientation | orientation | |||
) |
Set all path orientation.
This function set all path orientation.
path | The path need to be set. | |
orientation | The path direction. |
Set the transform matrix to the special path.
path | The path. | |
matrix | The translate matrix. |
Add a new sub path.
This function adds a new sub path.
path | The path pointer. |