|
LibGd 2.4.0-dev
GD Graphics library
|
Data Structures | |
| struct | gdPoint |
| A point in the coordinate space of the image. More... | |
| struct | gdRect |
| A rectangle in the coordinate space of the image. More... | |
Macros | |
| #define | gdArc 0 |
| Style flags for drawing arcs and chords Style is a bitwise OR ( | operator ) of these. gdArc and gdChord are mutually exclusive; gdChord just connects the starting and ending angles with a straight line, while gdArc produces a rounded edge. gdPie is a synonym for gdArc. gdNoFill indicates that the arc or chord should be outlined, not filled. gdEdged, used together with gdNoFill, indicates that the beginning and ending angles should be connected to the center; this is a good way to outline (rather than fill) a 'pie slice'. | |
| #define | gdPie gdArc |
| #define | gdChord 1 |
| #define | gdNoFill 2 |
| #define | gdEdged 4 |
Typedefs | |
| typedef struct gdPoint * | gdPointPtr |
| typedef struct gdRect * | gdRectPtr |
Functions | |
| void | gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c) |
| Draws a closed polygon. | |
| void | gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c) |
| Draws an open polygon. | |
| void | gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c) |
| Draws a filled polygon. | |
| void | gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color, int style) |
| Draws a filled arc or a filled chord. | |
| void | gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color) |
| Draws an arc or a chord. | |
| void | gdImageEllipse (gdImagePtr im, int cx, int cy, int w, int h, int color) |
| Draw an ellipse, stroke only. | |
| void | gdImageFilledEllipse (gdImagePtr im, int cx, int cy, int w, int h, int color) |
| Draw a filled ellipse. | |
| void | gdImageAABlend (gdImagePtr im) |
| void | gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) |
| Draws a rectangle. | |
| void | gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) |
| Draws a filled rectangle. | |
| void | gdImageSetClip (gdImagePtr im, int x1, int y1, int x2, int y2) |
| Sets the clipping rectangle. | |
| void | gdImageGetClip (gdImagePtr im, int *x1P, int *y1P, int *x2P, int *y2P) |
| Gets the current clipping rectangle. | |
| void | gdImageSetBrush (gdImagePtr im, gdImagePtr brush) |
| Sets the brush for following drawing operations. | |
| void | gdImageSetTile (gdImagePtr im, gdImagePtr tile) |
| Sets the tile for following drawing operations. | |
| void | gdImageSetAntiAliased (gdImagePtr im, int c) |
| Set the color for subsequent anti-aliased drawing. | |
| void | gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont_blend) |
| void | gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels) |
| Sets the style for following drawing operations. | |
| void | gdImageSetThickness (gdImagePtr im, int thickness) |
| #define gdArc 0 |
Style flags for drawing arcs and chords Style is a bitwise OR ( | operator ) of these. gdArc and gdChord are mutually exclusive; gdChord just connects the starting and ending angles with a straight line, while gdArc produces a rounded edge. gdPie is a synonym for gdArc. gdNoFill indicates that the arc or chord should be outlined, not filled. gdEdged, used together with gdNoFill, indicates that the beginning and ending angles should be connected to the center; this is a good way to outline (rather than fill) a 'pie slice'.
mutually exclusive with gdChord
| #define gdChord 1 |
mutually exclusive with gdArc
| #define gdEdged 4 |
used together with gdNoFill, indicates that the beginning and ending angles should be connected to the center
| #define gdNoFill 2 |
indicates that the arc or chord should be outlined, not filled
| #define gdPie gdArc |
synonym for gdArc
| typedef struct gdPoint * gdPointPtr |
A pointer to a <gdPoint>.
| void gdImageAABlend | ( | gdImagePtr | im | ) |
Group: Primitives
| void gdImageArc | ( | gdImagePtr | im, |
| int | cx, | ||
| int | cy, | ||
| int | w, | ||
| int | h, | ||
| int | s, | ||
| int | e, | ||
| int | color | ||
| ) |
Draws an arc or a chord.
| im | The image. |
| cx | The x-coordinate of the center. |
| cy | The y-coordinate of the center. |
| w | The width of the arc. |
| h | The height of the arc. |
| s | The starting angle in degrees. |
| e | The ending angle in degrees. |
| color | The color of the arc. A color identifier created with one of the image color allocate functions. |
< indicates that the arc or chord should be outlined, not filled
| void gdImageEllipse | ( | gdImagePtr | im, |
| int | cx, | ||
| int | cy, | ||
| int | w, | ||
| int | h, | ||
| int | color | ||
| ) |
Draw an ellipse, stroke only.
| im | The destination image. |
| cx | x-coordinate of the center. |
| cy | y-coordinate of the center. |
| w | The ellipse width. |
| h | The ellipse height. |
| color | The color of the ellipse. A color identifier created with one of the image color allocate functions. |
| void gdImageFilledArc | ( | gdImagePtr | im, |
| int | cx, | ||
| int | cy, | ||
| int | w, | ||
| int | h, | ||
| int | s, | ||
| int | e, | ||
| int | color, | ||
| int | style | ||
| ) |
Draws a filled arc or a filled chord.
| im | The image. |
| cx | The x-coordinate of the center. |
| cy | The y-coordinate of the center. |
| w | The width of the arc. |
| h | The height of the arc. |
| s | The starting angle in degrees. |
| e | The ending angle in degrees. |
| color | The color of the arc. A color identifier created with one of the image color allocate functions. |
| style | The style of the arc. A bitwise OR of gdArc, |
< mutually exclusive with gdArc
< indicates that the arc or chord should be outlined, not filled
< mutually exclusive with gdArc
< indicates that the arc or chord should be outlined, not filled
< mutually exclusive with gdArc
< indicates that the arc or chord should be outlined, not filled
< used together with gdNoFill, indicates that the beginning and ending angles should be connected to the center
< indicates that the arc or chord should be outlined, not filled
< used together with gdNoFill, indicates that the beginning and ending angles should be connected to the center
| void gdImageFilledEllipse | ( | gdImagePtr | im, |
| int | cx, | ||
| int | cy, | ||
| int | w, | ||
| int | h, | ||
| int | color | ||
| ) |
Draw a filled ellipse.
| im | The destination image. |
| cx | x-coordinate of the center. |
| cy | y-coordinate of the center. |
| w | The ellipse width. |
| h | The ellipse height. |
| color | The color of the ellipse. A color identifier created with one of the image color allocate functions. |
| void gdImageFilledPolygon | ( | gdImagePtr | im, |
| gdPointPtr | p, | ||
| int | n, | ||
| int | c | ||
| ) |
Draws a filled polygon.
The polygon is filled using the even-odd fillrule what can leave unfilled regions inside of self-intersecting polygons. This behavior might change in a future version.
| im | The image. |
| p | The vertices as array of <gdPoint>s. |
| n | The number of vertices. |
| c | The color. |
| void gdImageFilledRectangle | ( | gdImagePtr | im, |
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | color | ||
| ) |
Draws a filled rectangle.
| im | The image. |
| x1 | The x-coordinate of one of the corners. |
| y1 | The y-coordinate of one of the corners. |
| x2 | The x-coordinate of another corner. |
| y2 | The y-coordinate of another corner. |
| color | The color. |
| void gdImageGetClip | ( | gdImagePtr | im, |
| int * | x1P, | ||
| int * | y1P, | ||
| int * | x2P, | ||
| int * | y2P | ||
| ) |
Gets the current clipping rectangle.
| im | The image. |
| x1P | (out) The x-coordinate of the upper left corner. |
| y1P | (out) The y-coordinate of the upper left corner. |
| x2P | (out) The x-coordinate of the lower right corner. |
| y2P | (out) The y-coordinate of the lower right corner. |
| void gdImageOpenPolygon | ( | gdImagePtr | im, |
| gdPointPtr | p, | ||
| int | n, | ||
| int | c | ||
| ) |
Draws an open polygon.
| im | The image. |
| p | The vertices as array of <gdPoint>s. |
| n | The number of vertices. |
| c | The color. |
| void gdImagePolygon | ( | gdImagePtr | im, |
| gdPointPtr | p, | ||
| int | n, | ||
| int | c | ||
| ) |
Draws a closed polygon.
| im | The image. |
| p | The vertices as array of <gdPoint>s. |
| n | The number of vertices. |
| c | The color. |
| void gdImageRectangle | ( | gdImagePtr | im, |
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | color | ||
| ) |
Draws a rectangle.
Corners are specified by their coordinates. The rectangle is drawn using the current line style and thickness.
| im | The image. |
| x1 | The x-coordinate of one of the corners. |
| y1 | The y-coordinate of one of the corners. |
| x2 | The x-coordinate of another corner. |
| y2 | The y-coordinate of another corner. |
| color | The color. |
| void gdImageSetAntiAliased | ( | gdImagePtr | im, |
| int | c | ||
| ) |
Set the color for subsequent anti-aliased drawing.
If gdAntiAliased is passed as color to drawing operations that support anti-aliased drawing (such as gdImageLine and gdImagePolygon), the actual color to be used can be set with this function.
Example: draw an anti-aliased blue line:
| im | - The image. |
| c | - The color. |
| void gdImageSetAntiAliasedDontBlend | ( | gdImagePtr | im, |
| int | c, | ||
| int | dont_blend | ||
| ) |
Set the color and "dont_blend" color for subsequent anti-aliased drawing
This extended variant of <gdImageSetAntiAliased> allows to also specify a (background) color that will not be blended in anti-aliased drawing operations.
| im | The image. |
| c | The color. |
| dont_blend | Whether to blend. |
| void gdImageSetBrush | ( | gdImagePtr | im, |
| gdImagePtr | brush | ||
| ) |
Sets the brush for following drawing operations.
| im | The image. |
| brush | The brush image. |
| void gdImageSetClip | ( | gdImagePtr | im, |
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Sets the clipping rectangle.
The clipping rectangle restricts the drawing area for following drawing operations.
| im | - The image. |
| x1 | - The x-coordinate of the upper left corner. |
| y1 | - The y-coordinate of the upper left corner. |
| x2 | - The x-coordinate of the lower right corner. |
| y2 | - The y-coordinate of the lower right corner. |
| void gdImageSetStyle | ( | gdImagePtr | im, |
| int * | style, | ||
| int | noOfPixels | ||
| ) |
Sets the style for following drawing operations.
| im | The image. |
| style | An array of color values. |
| noOfPixel | The number of color values. |
| void gdImageSetThickness | ( | gdImagePtr | im, |
| int | thickness | ||
| ) |
Sets the thickness for following drawing operations
| im | The image. |
| thickness | The thickness in pixels. |
| void gdImageSetTile | ( | gdImagePtr | im, |
| gdImagePtr | tile | ||
| ) |
Sets the tile for following drawing operations.
The tile is used for filling areas with a repeating pattern. The tile image is repeated to fill the area being drawn.
| im | The image. |
| tile | The tile image. |