Expand description
tiny-skia
is a tiny Skia subset ported to Rust.
tiny-skia
API is a bit unconventional.
It doesn’t look like cairo, QPainter (Qt), HTML Canvas or even Skia itself.
Instead, tiny-skia
provides a set of low-level drawing APIs
and a user should manage the world transform, clipping mask and style manually.
See the examples/
directory for usage examples.
Structs§
- Color
- An RGBA color value, holding four floating point components.
- ColorU8
- A 32-bit RGBA color value.
- Gradient
Stop - A gradient point.
- IntRect
- An integer rectangle.
- IntSize
- An integer size.
- Linear
Gradient - A linear gradient shader.
- Mask
- A mask.
- NonZero
Rect - A rectangle defined by left, top, right and bottom edges.
- Paint
- Controls how a shape should be painted.
- Path
- A Bezier path.
- Path
Builder - A path builder.
- Path
Segments Iter - A path segments iterator.
- Path
Stroker - A path stroker.
- Pattern
- A pattern shader.
- Pixmap
- A container that owns premultiplied RGBA pixels.
- Pixmap
Mut - A container that references mutable premultiplied RGBA pixels.
- Pixmap
Paint - Controls how a pixmap should be blended.
- Pixmap
Ref - A container that references premultiplied RGBA pixels.
- Point
- A point.
- Premultiplied
Color - A premultiplied RGBA color value, holding four floating point components.
- Premultiplied
Color U8 - A 32-bit premultiplied RGBA color value.
- Radial
Gradient - A radial gradient shader.
- Rect
- A rectangle defined by left, top, right and bottom edges.
- Size
- A size.
- Stroke
- Stroke properties.
- Stroke
Dash - A stroke dashing properties.
- Transform
- An affine transformation matrix.
Enums§
- Blend
Mode - A blending mode.
- Fill
Rule - A path filling rule.
- Filter
Quality - Controls how much filtering to be done when transforming images.
- LineCap
- Draws at the beginning and end of an open path contour.
- Line
Join - Specifies how corners are drawn when a shape is stroked.
- Mask
Type - A mask type.
- Path
Segment - A path segment.
- Shader
- A shader specifies the source color(s) for what is being drawn.
- Spread
Mode - A shader spreading mode.
Constants§
- ALPHA_
OPAQUE - Represents fully opaque Alpha value.
- ALPHA_
TRANSPARENT - Represents fully transparent Alpha value.
- ALPHA_
U8_ OPAQUE - Represents fully opaque AlphaU8 value.
- ALPHA_
U8_ TRANSPARENT - Represents fully transparent AlphaU8 value.
- BYTES_
PER_ PIXEL - Number of bytes per pixel.