Struct elmesque::form::Form [] [src]

pub struct Form {
    pub theta: f64,
    pub scale: f64,
    pub x: f64,
    pub y: f64,
    pub alpha: f32,
    pub form: BasicForm,
}

A general, freeform 2D graphics structure.

Fields

Methods

impl Form
[src]

Move a form by the given amount. this is a relative translation so shift(10.0, 10.0, form) would moveform` ten pixels up and ten pixels to the right.

Move a shape in the x direction. This is relative so shift_x(10.0, form) moves form 10 pixels to the right.

Move a shape in the y direction. This is relative so shift_y(10.0, form) moves `form upwards by 10 pixels.

Scale a form by a given factor. Scaling by 2 doubles both dimensions and quadruples the area.

Rotate a form by a given angle. Rotate takes radians and turns things counterclockwise. So to turn form 30 degrees to the left you would say rotate(degrees(30), form).

Set the alpha of a Form. The default is 1 and 0 is totally transparent.

Trait Implementations

impl Clone for Form
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Form
[src]

Formats the value using the given formatter.