Crate farba

Source

Macros§

rgb
Macro to pack RGB values into a u32 with an alpha of 255
rgba
Macro to pack RGBA values into a u32

Structs§

Canvas
Mat3
Represents the 3x3 matrix with the following values:
NormalizedRect
NormalizedTriangle
RGBAColor
Vec2
Vec3

Traits§

Color

Functions§

normalize_rect
The point of this function is to produce two ranges x1..=x2 and y1..=y2 that are guaranteed to be safe to iterate over the canvas of size canvas_width by canvas_height without any boundary checks.
normalize_triangle
The point of this function is to produce two ranges left_x..=right_x and top_y..=bottom_y that are guaranteed to be safe to iterate over the canvas of size width by height without any boundary checks.