---
name: "egd"
section: "3erl"
platform: "linux"
package: "erlang-manpages"
version: "1:19.2.1+dfsg-2+deb9u3"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/egd"
---

# egd(3erl)

egd - erlang graphical drawer.

## NAME

egd - egd - erlang graphical drawer.

## DESCRIPTION

egd - erlang graphical drawer

## DATA TYPES

- **color():**

  - **egd\_image():**

  - **font():**

  - **point() = {integer(), integer()}:**

  - **render\_option() = {render\_engine, opaque} \| {render\_engine, alpha}:**

  ## EXPORTS

**color(Color::Value \| Name) -\> color()**\

Types:

Value = {byte(), byte(), byte()} \| {byte(), byte(), byte(), byte()}\
 Name = black \| silver \| gray \| white \| maroon \| red \| purple \| fuchia \| green \| lime \| olive \| yellow \| navy \| blue \| teal \| aqua\

Creates a color reference.

**create(Width::integer(), Height::integer()) -\> egd\_image()**\

Creates an image area and returns its reference.

**destroy(Image::egd\_image()) -\> ok**\

Destroys the image.

**filledEllipse(Image::egd\_image(), P1::point(), P2::point(), Color::color()) -\> ok**\

Creates a filled ellipse object.

**filledRectangle(Image::egd\_image(), P1::point(), P2::point(), Color::color()) -\> ok**\

Creates a filled rectangle object.

**line(Image::egd\_image(), P1::point(), P2::point(), Color::color()) -\> ok**\

Creates a line object from P1 to P2 in the image.

**rectangle(Image::egd\_image(), P1::point(), P2::point(), Color::color()) -\> ok**\

Creates a rectangle object.

**render(Image::egd\_image()) -\> binary()**\

Equivalent to **render(Image, png, \[{render\_engine, opaque}\])**.

**render(Image::egd\_image(), Type::png \| raw\_bitmap) -\> binary()**\

Equivalent to **render(Image, Type, \[{render\_engine, opaque}\])**.

**render(Image::egd\_image(), Type::png \| raw\_bitmap, Options::\[render\_option()\]) -\> binary()**\

Renders a binary from the primitives specified by egd\_image(). The binary can either be a raw bitmap with rgb tripplets or a binary in png format.

**save(Binary::binary(), Filename::string()) -\> ok**\

Saves the binary to file.

**text(Image::egd\_image(), P::point(), Font::font(), Text::string(), Color::color()) -\> ok**\

Creates a text object.

## AUTHORS

*\<\>*
