Difference between revisions of "GFL Drawing"
From XnView Wiki
(Created page with 'gflDrawPointColor The gflDrawPointColor function allows to draw a point on a picture. GFL_ERROR gflDrawPointColor( GFL_BITMAP * src, GFL_INT32 x, GFL_INT32 y, G…') |
|||
Line 1: | Line 1: | ||
gflDrawPointColor | == gflDrawPointColor == | ||
The gflDrawPointColor function allows to draw a point on a picture. | The gflDrawPointColor function allows to draw a point on a picture. | ||
GFL_ERROR <b>gflDrawPointColor</b>( | |||
GFL_BITMAP* src, | |||
GFL_INT32 x, | |||
GFL_INT32 y, | |||
GFL_UINT32 line_width, | |||
const GFL_COLOR* line_color, | |||
GFL_BITMAP** dst, | |||
); | |||
'''Parameters''' | |||
:src | |||
::Pointer to a [[Structures#GFL_BITMAP|GFL_BITMAP]] structure. | |||
:x | |||
::X position. | |||
:y | |||
::Y position. | |||
:line_width | |||
::Width of the point (1 à 13). | |||
:line_color | |||
::Pointer to a [[Structures#GFL_COLOR|GFL_COLOR]] structure. Color of the point. | |||
:dst | |||
::Address of a pointer to a [[Structures#GFL_BITMAP|GFL_BITMAP]] structure. NULL if on the same instance. | |||
'''Return value''' | |||
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]]. | |||
== gflDrawLineColor == | |||
The gflDrawLineColor function allows to draw a line on a picture. | |||
GFL_ERROR <b>gflDrawLineColor</b>( | |||
GFL_BITMAP* src, | |||
GFL_INT32 x0, | |||
GFL_INT32 y0, | |||
GFL_INT32 x1, | |||
GFL_INT32 y1, | |||
GFL_UINT32 line_width, | |||
const GFL_COLOR* line_color, | |||
GFL_LINE_STYLE line_style, | |||
GFL_BITMAP** dst, | |||
); | |||
'''Parameters''' | |||
:src | |||
::Pointer to a [[Structures#GFL_BITMAP|GFL_BITMAP]] structure. | |||
:x0 | |||
::X start position. | |||
:y0 | |||
::Y start position. | |||
:x1 | |||
::X end position. | |||
:y1 | |||
::Y end position. | |||
:line_width | |||
::Width of the line (1 to 13). | |||
:line_color | |||
::Pointer to a [[Structures#GFL_COLOR|GFL_COLOR]] structure. Color of the line. | |||
:line_style | |||
::Works only with a line width of 1. | |||
::{| | |||
|GFL_LINE_STYLE_SOLID || Solid | |||
|- | |||
|GFL_LINE_STYLE_DASH || Dashes | |||
|- | |||
|GFL_LINE_STYLE_DOT || Dots | |||
|- | |||
|GFL_LINE_STYLE_DASHDOT || Alternating dashes and dots | |||
|- | |||
|GFL_LINE_STYLE_DASHDOTDOT || Alternating dashes and double dots | |||
|} | |||
:dst | |||
::Address of a pointer to a [[Structures#GFL_BITMAP|GFL_BITMAP]] structure. NULL if on the same instance. | |||
'''Return value''' | |||
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]]. | |||
gflDrawPolylineColor | == gflDrawPolylineColor == | ||
The gflDrawPolylineColor function allows to draw a polyline on a picture. | The gflDrawPolylineColor function allows to draw a polyline on a picture. | ||
GFL_ERROR <b>gflDrawPolylineColor</b>( | |||
GFL_BITMAP* src, | |||
const GFL_POINT points[], | |||
GFL_INT32 num_points, | |||
GFL_UINT32 line_width, | |||
const GFL_COLOR* line_color, | |||
GFL_LINE_STYLE line_style, | |||
GFL_BITMAP** dst, | |||
); | |||
'''Parameters''' | |||
Parameters | |||
:src | |||
::Pointer to a [[Structures#GFL_BITMAP|GFL_BITMAP]] structure. | |||
:points | |||
::Address of a array of GFL_POINT structure. | |||
:num_points | |||
::Number of points. | |||
:line_width | |||
::Width fo the line (1 to 13). | |||
:line_color | |||
::Pointer to a [[Structures#GFL_COLOR|GFL_COLOR]] structure. | |||
:line_style | |||
::Works only with a line width of 1. | |||
::{| | |||
|GFL_LINE_STYLE_SOLID || Solid | |||
|- | |||
|GFL_LINE_STYLE_DASH || Dashes | |||
|- | |||
|GFL_LINE_STYLE_DOT || Dots | |||
|- | |||
|GFL_LINE_STYLE_DASHDOT || Alternating dashes and dots | |||
|- | |||
|GFL_LINE_STYLE_DASHDOTDOT || Alternating dashes and double dots | |||
|} | |||
:dst | |||
::Address of a pointer to a [[Structures#GFL_BITMAP|GFL_BITMAP]] structure. NULL if on the same instance. | |||
'''Return value''' | |||
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]]. | |||
gflDrawRectangleColor | == gflDrawRectangleColor == | ||
The gflDrawRectangleColor function allows to draw a rectangle on a picture. | The gflDrawRectangleColor function allows to draw a rectangle on a picture. | ||
GFL_ERROR <b>gflDrawRectangleColor</b>( | |||
GFL_BITMAP* src, | |||
GFL_INT32 x, | |||
GFL_INT32 y, | |||
GFL_INT32 width, | |||
GFL_INT32 height, | |||
const GFL_COLOR* fill_color, | |||
GFL_UINT32 line_width, | |||
const GFL_COLOR* line_color, | |||
GFL_LINE_STYLE line_style, | |||
GFL_BITMAP** dst, | |||
); | |||
'''Parameters''' | |||
Parameters | |||
:src | |||
::Pointer to a [[Structures#GFL_BITMAP|GFL_BITMAP]] structure. | |||
:x | |||
::X start. | |||
:y | |||
::Y start. | |||
:width | |||
::Width of the rectangle. | |||
:height | |||
::Height of the rectangle. | |||
:fill_color | |||
::Pointer of a [[Structures#GFL_COLOR|GFL_COLOR]] structure. | |||
::If NULL, no fill. | |||
:line_width | |||
::Width of the line (1 to 13). | |||
:line_color | |||
::Pointer of a [[Structures#GFL_COLOR|GFL_COLOR]] structure. | |||
::If NULL, no outline. | |||
:line_style | |||
::Works only with a line width of 1. | |||
::{| | |||
|GFL_LINE_STYLE_SOLID || Solid | |||
|- | |||
|GFL_LINE_STYLE_DASH || Dashes | |||
|- | |||
|GFL_LINE_STYLE_DOT || Dots | |||
|- | |||
|GFL_LINE_STYLE_DASHDOT || Alternating dashes and dots | |||
|- | |||
|GFL_LINE_STYLE_DASHDOTDOT || Alternating dashes and double dots | |||
|} | |||
:dst | |||
::Address of a pointer to a [[Structures#GFL_BITMAP|GFL_BITMAP]] structure. NULL if on the same instance. | |||
'''Return value''' | |||
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]]. | |||
gflDrawPolygonColor | == gflDrawPolygonColor == | ||
The gflDrawPolygonColor function allows to draw a poylgone on the picture. | The gflDrawPolygonColor function allows to draw a poylgone on the picture. | ||
GFL_ERROR <b>gflDrawPolygonColor</b>( | |||
GFL_BITMAP* src, | |||
const GFL_POINT points[], | |||
GFL_INT32 num_points, | |||
const GFL_COLOR* fill_color, | |||
GFL_UINT32 line_width, | |||
const GFL_COLOR* line_color, | |||
GFL_LINE_STYLE line_style, | |||
GFL_BITMAP** dst, | |||
); | |||
'''Parameters''' | |||
Parameters | |||
src | :src | ||
Pointer to a GFL_BITMAP structure. | ::Pointer to a [[Structures#GFL_BITMAP|GFL_BITMAP]] structure. | ||
points | :points | ||
Address to an array of GFL_POINT structure. | ::Address to an array of [[Structures#GFL_POINT|GFL_POINT]] structure. | ||
Closing the polygone is not necessary. | ::Closing the polygone is not necessary. | ||
num_points | :num_points | ||
Number of points. | ::Number of points. | ||
fill_color | :fill_color | ||
Pointer to a GFL_COLOR structure. | ::Pointer to a [[Structures#GFL_COLOR|GFL_COLOR]] structure. | ||
If NULL, no fill. | ::If NULL, no fill. | ||
line_width | :line_width | ||
Width of the line (1 to 13). | ::Width of the line (1 to 13). | ||
line_color | :line_color | ||
Pointer to a GFL_COLOR structure. | ::Pointer to a [[Structures#GFL_COLOR|GFL_COLOR]] structure. | ||
If NULL, no outline. | ::If NULL, no outline. | ||
line_style | :line_style | ||
Works only with a line width of 1. GFL_LINE_STYLE_SOLID Solid | ::Works only with a line width of 1. | ||
GFL_LINE_STYLE_DASH Dashes | ::{| | ||
GFL_LINE_STYLE_DOT Dots | |GFL_LINE_STYLE_SOLID || Solid | ||
GFL_LINE_STYLE_DASHDOT Alternating dashes and dots | |- | ||
GFL_LINE_STYLE_DASHDOTDOT Alternating dashes and double dots | |GFL_LINE_STYLE_DASH || Dashes | ||
|- | |||
|GFL_LINE_STYLE_DOT || Dots | |||
|- | |||
|GFL_LINE_STYLE_DASHDOT || Alternating dashes and dots | |||
|- | |||
|GFL_LINE_STYLE_DASHDOTDOT || Alternating dashes and double dots | |||
|} | |||
:dst | |||
::Address of a pointer to a [[Structures#GFL_BITMAP|GFL_BITMAP]] structure. NULL if on the same instance. | |||
'''Return value''' | |||
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]]. | |||
== gflDrawCircleColor == | |||
gflDrawCircleColor | |||
The gflDrawCircleColor function allows to draw a circle on a picture. | The gflDrawCircleColor function allows to draw a circle on a picture. | ||
GFL_ERROR <b>gflDrawCircleColor</b>( | |||
GFL_BITMAP* src, | |||
GFL_INT32 x, | |||
GFL_INT32 y, | |||
GFL_INT32 redius, | |||
const GFL_COLOR* fill_color, | |||
GFL_UINT32 line_width, | |||
const GFL_COLOR* line_color, | |||
GFL_LINE_STYLE line_style, | |||
GFL_BITMAP** dst, | |||
); | |||
'''Parameters''' | |||
Parameters | |||
:src | |||
::Pointer to a [[Structures#GFL_BITMAP|GFL_BITMAP]] structure. | |||
:x | |||
::X center. | |||
:y | |||
::Y center. | |||
:radius | |||
::Radius of the circle. | |||
:fill_color | |||
::Pointer to a [[Structures#GFL_COLOR|GFL_COLOR]] structure. | |||
::If NULL, no fill. | |||
:line_width | |||
::Width of the line (1 to 13). | |||
:line_color | |||
::Pointer to a [[Structures#GFL_COLOR|GFL_COLOR]] structure. | |||
::If NULL, no outline. | |||
:line_style | |||
::Works only with a line width of 1. | |||
::{| | |||
|GFL_LINE_STYLE_SOLID || Solid | |||
|- | |||
|GFL_LINE_STYLE_DASH || Dashes | |||
|- | |||
|GFL_LINE_STYLE_DOT || Dots | |||
|- | |||
|GFL_LINE_STYLE_DASHDOT || Alternating dashes and dots | |||
|- | |||
|GFL_LINE_STYLE_DASHDOTDOT || Alternating dashes and double dots | |||
|} | |||
:dst | |||
::Address of a pointer to a [[Structures#GFL_BITMAP|GFL_BITMAP]] structure. NULL if on the same instance. | |||
'''Return value''' | |||
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]]. |
Revision as of 14:33, 24 September 2009
gflDrawPointColor
The gflDrawPointColor function allows to draw a point on a picture.
GFL_ERROR gflDrawPointColor( GFL_BITMAP* src, GFL_INT32 x, GFL_INT32 y, GFL_UINT32 line_width, const GFL_COLOR* line_color, GFL_BITMAP** dst, );
Parameters
- src
- Pointer to a GFL_BITMAP structure.
- x
- X position.
- y
- Y position.
- line_width
- Width of the point (1 à 13).
- line_color
- Pointer to a GFL_COLOR structure. Color of the point.
- dst
- Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
Return value
- The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
gflDrawLineColor
The gflDrawLineColor function allows to draw a line on a picture.
GFL_ERROR gflDrawLineColor( GFL_BITMAP* src, GFL_INT32 x0, GFL_INT32 y0, GFL_INT32 x1, GFL_INT32 y1, GFL_UINT32 line_width, const GFL_COLOR* line_color, GFL_LINE_STYLE line_style, GFL_BITMAP** dst, );
Parameters
- src
- Pointer to a GFL_BITMAP structure.
- x0
- X start position.
- y0
- Y start position.
- x1
- X end position.
- y1
- Y end position.
- line_width
- Width of the line (1 to 13).
- line_color
- Pointer to a GFL_COLOR structure. Color of the line.
- line_style
- Works only with a line width of 1.
GFL_LINE_STYLE_SOLID Solid GFL_LINE_STYLE_DASH Dashes GFL_LINE_STYLE_DOT Dots GFL_LINE_STYLE_DASHDOT Alternating dashes and dots GFL_LINE_STYLE_DASHDOTDOT Alternating dashes and double dots
- dst
- Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
Return value
- The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
gflDrawPolylineColor
The gflDrawPolylineColor function allows to draw a polyline on a picture.
GFL_ERROR gflDrawPolylineColor( GFL_BITMAP* src, const GFL_POINT points[], GFL_INT32 num_points, GFL_UINT32 line_width, const GFL_COLOR* line_color, GFL_LINE_STYLE line_style, GFL_BITMAP** dst, );
Parameters
- src
- Pointer to a GFL_BITMAP structure.
- points
- Address of a array of GFL_POINT structure.
- num_points
- Number of points.
- line_width
- Width fo the line (1 to 13).
- line_color
- Pointer to a GFL_COLOR structure.
- line_style
- Works only with a line width of 1.
GFL_LINE_STYLE_SOLID Solid GFL_LINE_STYLE_DASH Dashes GFL_LINE_STYLE_DOT Dots GFL_LINE_STYLE_DASHDOT Alternating dashes and dots GFL_LINE_STYLE_DASHDOTDOT Alternating dashes and double dots
- dst
- Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
Return value
- The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
gflDrawRectangleColor
The gflDrawRectangleColor function allows to draw a rectangle on a picture.
GFL_ERROR gflDrawRectangleColor( GFL_BITMAP* src, GFL_INT32 x, GFL_INT32 y, GFL_INT32 width, GFL_INT32 height, const GFL_COLOR* fill_color, GFL_UINT32 line_width, const GFL_COLOR* line_color, GFL_LINE_STYLE line_style, GFL_BITMAP** dst, );
Parameters
- src
- Pointer to a GFL_BITMAP structure.
- x
- X start.
- y
- Y start.
- width
- Width of the rectangle.
- height
- Height of the rectangle.
- fill_color
- Pointer of a GFL_COLOR structure.
- If NULL, no fill.
- line_width
- Width of the line (1 to 13).
- line_color
- Pointer of a GFL_COLOR structure.
- If NULL, no outline.
- line_style
- Works only with a line width of 1.
GFL_LINE_STYLE_SOLID Solid GFL_LINE_STYLE_DASH Dashes GFL_LINE_STYLE_DOT Dots GFL_LINE_STYLE_DASHDOT Alternating dashes and dots GFL_LINE_STYLE_DASHDOTDOT Alternating dashes and double dots
- dst
- Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
Return value
- The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
gflDrawPolygonColor
The gflDrawPolygonColor function allows to draw a poylgone on the picture.
GFL_ERROR gflDrawPolygonColor( GFL_BITMAP* src, const GFL_POINT points[], GFL_INT32 num_points, const GFL_COLOR* fill_color, GFL_UINT32 line_width, const GFL_COLOR* line_color, GFL_LINE_STYLE line_style, GFL_BITMAP** dst, );
Parameters
- src
- Pointer to a GFL_BITMAP structure.
- points
- Address to an array of GFL_POINT structure.
- Closing the polygone is not necessary.
- num_points
- Number of points.
- fill_color
- Pointer to a GFL_COLOR structure.
- If NULL, no fill.
- line_width
- Width of the line (1 to 13).
- line_color
- Pointer to a GFL_COLOR structure.
- If NULL, no outline.
- line_style
- Works only with a line width of 1.
GFL_LINE_STYLE_SOLID Solid GFL_LINE_STYLE_DASH Dashes GFL_LINE_STYLE_DOT Dots GFL_LINE_STYLE_DASHDOT Alternating dashes and dots GFL_LINE_STYLE_DASHDOTDOT Alternating dashes and double dots
- dst
- Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
Return value
- The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
gflDrawCircleColor
The gflDrawCircleColor function allows to draw a circle on a picture.
GFL_ERROR gflDrawCircleColor( GFL_BITMAP* src, GFL_INT32 x, GFL_INT32 y, GFL_INT32 redius, const GFL_COLOR* fill_color, GFL_UINT32 line_width, const GFL_COLOR* line_color, GFL_LINE_STYLE line_style, GFL_BITMAP** dst, );
Parameters
- src
- Pointer to a GFL_BITMAP structure.
- x
- X center.
- y
- Y center.
- radius
- Radius of the circle.
- fill_color
- Pointer to a GFL_COLOR structure.
- If NULL, no fill.
- line_width
- Width of the line (1 to 13).
- line_color
- Pointer to a GFL_COLOR structure.
- If NULL, no outline.
- line_style
- Works only with a line width of 1.
GFL_LINE_STYLE_SOLID Solid GFL_LINE_STYLE_DASH Dashes GFL_LINE_STYLE_DOT Dots GFL_LINE_STYLE_DASHDOT Alternating dashes and dots GFL_LINE_STYLE_DASHDOTDOT Alternating dashes and double dots
- dst
- Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
Return value
- The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.