Expand description
Modules§
- color
- Colors:
0xAARRGGBB, straight alpha — what every Yog format and API passes. - draw
- Drawings: what to paint, in order — paths filled or stroked, images —
in a drawing’s own units (
yup). Glyphs, icons and shapes are drawings; aCanvaspaints them. - image
- RGBA images.
- mask
- One-color pictures, a bit a pixel: a pixel font’s glyph is one — a thirty-second of the same picture as RGBA.
- math
- Vectors and 4×4 matrices (column-major, as JOML and the hosts’
PoseStackkeep them). - path
- Vector paths: contours of lines and curves, as fonts, SVG and drawn shapes describe them.
- raster
- A canvas to draw on in pixels (
ydown): shapes filled with signed-area coverage (anti-aliased, non-zero winding), strokes as the union of their segments with round joins and caps, images sampled into place. - rect
- Axis-aligned rectangles.
Structs§
- Canvas
- Pixels being drawn, premultiplied, in floats.
- Color
- A color,
0xAARRGGBB. - Fill
- Image
- Pixels, RGBA8 row by row from the top, straight alpha.
- ImageOp
imagein boxrect(rect.x, rect.yits bottom-left corner).- Mask
width × heightpixels, a bit each: rows top to bottom, a row’s pixels from its first byte’s highest bit on, each row whole bytes.- MaskOp
maskin boxrect(rect.x, rect.yits bottom-left corner), its set pixelscolor(none: the current color — a text’s).- Mat4
- A 4×4 matrix, column-major:
m[col * 4 + row]. - Placed
Image - An image and where it goes: its top-left corner
x, ypixels (ydown) from the origin it was drawn for — a glyph’s from its pen position on the baseline, say. - Rect
- A rectangle: its corner
x, y(the one with the smallest coordinates) and its size. - Stroke
- Vec2
- A point or a direction in a plane.
- Vec3
Enums§
Constants§
- BYTES_
PER_ PIXEL - Bytes per pixel: red, green, blue, alpha.
Functions§
- rad
- Degrees to radians, for the formats (which are in degrees).
Type Aliases§
- Rgba8
- One RGBA8 pixel.