[][src]Crate gdl

GDL is a graphic design crate that allows developers to rapidly design and create 2D graphics natively and for the web.

This crate contains built-in templates for rapid graphic creation, resizing for social media, and utils for design, but also provides more low-level access to developers who wish to work with the elements directly, and create their own designs from the elements available.

To view a full demo of templates available, visit the official website.

Modules

background
collage

Create image collages.

diagrams

Create diagrams, flowcharts, graphs, etc.,

elements

Add shapes and other elements to images.

graphics
helpers
presets

Templates for rapid graphic creation.

resize

Resize images to specific sizes/for various social media platforms.

text

Draw text onto images.

Structs

ColorScheme

Generate color schemes from a single input color.

Font

Provides the image's height, width, and contains the image's raw pixels. For use when communicating between JS and WASM, and also natively.

PhotonImage

Provides the image's height, width, and contains the image's raw pixels. For use when communicating between JS and WASM, and also natively.

Rgb

Rgb color type.

Functions

draw_rect_web
get_image_data

Get the ImageData from a 2D canvas context

new_rgb

Create a new RGB colour. TODO Will be using struct impl soon.

new_with_background
open_image

Convert the ImageData found in the canvas context to a PhotonImage, which can be used to filter or apply effects to the image

put_image_data

Place the ImageData onto the 2D context.

run
to_image_data

Convert a PhotonImage to JS-compatible ImageData

to_raw_pixels

Convert ImageData to raw pixels.