Library egd is an interface for the gd library. Currently only a subset of gd's functions are implemented. The egd module should be considered experimental and behaviour may change in future releases.
Draws an arc with centerpoint in Center, width Width and height Height. Start and End are degrees (not radians) of the arc.
color(Image::image(), RGB) -> Color
Types:
RGB = white | black | red | blue | green | {byte(), byte(), byte()}
Color = color() | {error, {invalid_color, RGB}}
color(Image::image(), R::byte(), G::byte(), B::byte()) -> color()
create(Width::integer(), Height::integer()) -> image()
destroy(Image::image()) -> ok | error
fill(Image::image(), Center::point(), Color::color()) -> ok
Types:
Options = [Option]
Option = arc | chord | no_fill | edged
Draws a filled arc with centerpoint in (Cx, Cy), width Width and height Height. Start and End are degrees (not radians) of the arc.
filledPolygon(Image::image(), Points::[point()], Color::color()) -> ok
Draws a filled polygon in the image with color Color. The last point and first points forms the polygon closure.
filledRectangle(Image::image(), Start::point(), End::point(), Color::color()) -> ok
fontSize(Image::image(), Font::font()) -> {Width, Height}
Types:
Widht = integer()
Height = integer()
image(Image::image(), Type) -> binary()
Types:
Type = gif | png | jpeg | {jpeg, Quality}
Quality = integer()
line(Image::image(), Start::point(), End::point(), Color::color()) -> ok
pixel(Image::image(), Point::point(), Color::color()) -> ok
polygon(Image::image(), Points::[points()], Color::color()) -> ok
Draws a polygon in the image with color Color. The last point and first points forms the polygon closure.
rectangle(Image::image(), Start::point(), End::point(), Color::color()) -> ok
resample(Image::image(), Width::integer(), Height::integer()) -> ok
rotate(Image::image(), Angle::integer()) -> ok
save(ImageBinary::binary(), Filename::string()) -> {ok, Filename} | {error, Reason}
text(Image::image(), Font::font(), Point::point(), String::string(), Color::color()) -> ok
textUp(Image::image(), Font::font(), Point::point(), String::string(), Color::color()) -> ok