back to gd
Constants
generated from ../src/mod_gd/module.cpp
Constants
| Name |
Description |
| gd.AntiAliased |
Used in place of a color when invoking a line-drawing function such as
line or rectangle. When gd.AntiAliased is used as
the color, the foreground color set with setAntiAliased is
used, with antialiasing mechanisms to minimize any "jagged" appearance.
For more information, see setAntiAliased.
|
| gd.Brushed |
Used in place of a color when invoking a line-drawing function such as
line or rectangle. When gd.Brushed is used as the
color, the brush image set with setBrush is drawn in place of
each pixel of the line (the brush is usually larger than one pixel,
creating the effect of a wide paintbrush). See also gd.styledBrushed
for a way to draw broken lines with a series of distinct copies of an image.
|
| gd.MaxColors |
The constant 256. This is the maximum number of colors in a palette-based
PNG file according to the PNG standard, and is also the maximum number of
colors in a palette-based gd image. This of course does not apply to
truecolor images.
|
| gd.Styled |
Used in place of a color when invoking a line-drawing function such as
line or rectangle. When gd.Styled is used as the
color, the colors of the pixels are drawn successively from the style
that has been set with setStyle. If the color of a pixel is
equal to gd.Transparent, that pixel is not altered. (This mechanism is
completely unrelated to the "transparent color" of the image itself;
see transparent for that mechanism.) See also
gd.StyledBrushed.
|
| gd.StyledBrushed |
Used in place of a color when invoking a line-drawing function such as
line or rectangle. When gd.StyledBrushed is used as
the color, the brush image set with setBrush is drawn at
each pixel of the line, providing that the style set with
setStyle contains a nonzero value (OR gd.Transparent, which
does not equal zero but is supported for consistency) for the current
pixel. (Pixels are drawn successively from the style as the line is
drawn, returning to the beginning when the available pixels in the style
are exhausted.) Note that this differs from the behavior of gd.Styled,
in which the values in the style are used as actual pixel colors, except
for gd.Transparent.
|
| gd.Tiled |
Used in place of a normal color in filledRectangle,
filledPolygon, fill, and fillToBorder.
gd.Tiled selects a pixel from the tile image set with setTile
in such a way as to ensure that the filled area will be tiled with copies
of the tile image. See the discussions of fill and
fillToBorder for special restrictions regarding those
functions.
|
| gd.Transparent |
Used in place of a normal color in a style to be set with
setStyle. gd.Transparent is not the transparent color index
of the image; for that functionality please see
transparent.
|
Methods
trueColor
trueColor(Color) : Integer
| Name |
Type |
Default |
Description |
| Color |
Object |
|
An object with a red, green and blue property |
trueColor(Red,
Green,
Blue) : Integer
| Name |
Type |
Default |
Description |
| Red |
Integer |
|
|
| Green |
Integer |
|
|
| Blue |
Integer |
|
|
gd.trueColor returns an RGBA color value for use when drawing on a
truecolor image. This method should not be used with palette-based images.
If you need to write code which is compatible with both palette-based and
truecolor images, use colorResolve.
trueColorAlpha
trueColorAlpha(Color,
Alpha) : Integer
| Name |
Type |
Default |
Description |
| Color |
wxColour |
|
|
| Alpha |
Integer |
|
|
gd.trueColor returns an RGBA color value for use when drawing on a
truecolor image. This method should not be used with palette-based images.
If you need to write code which is compatible with both palette-based and
truecolor images, use colorResolve.
useFontConfig
useFontConfig(Switch) : Boolean
| Name |
Type |
Default |
Description |
| Switch |
Boolean |
|
|
GD 2.0.29 introduced the ability to use fontconfig patterns rather than
font file names as parameters to stringFT, stringFTEx
and stringFTCircle. For backwards compatibility reasons, the
fontlist parameter to those functions is still expected to be a full or
partial font file path name or list thereof by default. However, as a
convenience, a single call to gd.useFontConfig with a nonzero
parameter configures gd to expect the fontlist parameter to be a fontconfig
pattern. Regardless of whether the flag argument is nonzero, this function
returns true when the fontconfig library is available and false when it is
not. When fontconfig is not available, the fontlist parameter always
behaves as in previous versions of GD.