View Source egd (egd v0.10.1)
egd - erlang graphical drawer
Summary
Types
HTML color extensions
HTML default colors
Internal font representation returned by egd_font:load/1
or egd_font:load_binary/1
Functions
Creates a color reference.
Creates an image area and returns its reference.
Destroys the image.
Creates a filled ellipse object.
Creates a filled rectangle object.
Creates a line object from P1 to P2 in the image.
Creates a rectangle object.
Equivalent to render(Image, png, [{render_engine, opaque}]).
Renders a binary from the primitives specified by egd_image(). The binary can either be a raw bitmap with rgb triplets or a binary in png format.
Saves the binary to file.
Creates a text object.
Types
-type colorName() :: colorNameSimple() | colorNameExtended().
-type colorNameExtended() ::
aliceblue | antiquewhite | aquamarine | azure | beige | bisque | blanchedalmond | blueviolet |
brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk |
crimson | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkkhaki |
darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen |
darkslateblue | darkslategray | darkturquoise | darkviolet | deeppink | deepskyblue |
dimgray | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro |
ghostwhite | gold | goldenrod | greenyellow | honeydew | hotpink | indianred | indigo |
ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral |
lightcyan | lightgoldenrodyellow | lightgreen | lightgrey | lightpink | lightsalmon |
lightseagreen | lightskyblue | lightslategray | lightsteelblue | lightyellow | limegreen |
linen | magenta | mediumaquamarine | mediumblue | mediumorchid | mediumpurple |
mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred |
midnightblue | mintcream | mistyrose | moccasin | navajowhite | oldlace | olivedrab | orange |
orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip |
peachpuff | peru | pink | plum | powderblue | rosybrown | royalblue | saddlebrown | salmon |
sandybrown | seagreen | seashell | sienna | skyblue | slateblue | slategray | snow |
springgreen | steelblue | tan | thistle | tomato | turquoise | violet | wheat | whitesmoke |
yellowgreen.
HTML color extensions
-type colorNameSimple() ::
aqua | black | blue | fuchia | gray | green | lime | maroon | navy | olive | purple | red |
silver | teal | white | yellow.
HTML default colors
-type egd_image() :: pid().
-type font() :: term().
Internal font representation returned by egd_font:load/1
or egd_font:load_binary/1
-type image_type() :: png | raw_bitmap | eps.
-type point() :: {X :: non_neg_integer(), Y :: non_neg_integer()}.
-type render_option() :: {render_engine, opaque} | {render_engine, alpha}.
Functions
Creates a color reference.
Creates an image area and returns its reference.
-spec destroy(Image :: egd_image()) -> ok.
Destroys the image.
-spec filledEllipse(Image :: egd_image(), Point1 :: point(), Point2 :: point(), Color :: color()) -> ok.
Creates a filled ellipse object.
-spec filledRectangle(Image :: egd_image(), Point1 :: point(), Point2 :: point(), Color :: color()) -> ok.
Creates a filled rectangle object.
Creates a line object from P1 to P2 in the image.
-spec rectangle(Image :: egd_image(), Point1 :: point(), Point2 :: point(), Color :: color()) -> ok.
Creates a rectangle object.
Equivalent to render(Image, png, [{render_engine, opaque}]).
-spec render(Image :: egd_image(), Type :: image_type()) -> binary().
Equivalent to render(Image, Type, [{render_engine, opaque}]).
-spec render(Image :: egd_image(), Type :: image_type(), Options :: [render_option()]) -> binary().
Renders a binary from the primitives specified by egd_image(). The binary can either be a raw bitmap with rgb triplets or a binary in png format.
Saves the binary to file.
-spec text(Image :: egd_image(), Point :: point(), Font :: font(), Text :: string(), Color :: color()) -> ok.
Creates a text object.