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.
- GradientStop 
- A gradient point.
- IntRect
- An integer rectangle.
- IntSize
- An integer size.
- LinearGradient 
- A linear gradient shader.
- Mask
- A mask.
- NonZeroRect 
- A rectangle defined by left, top, right and bottom edges.
- Paint
- Controls how a shape should be painted.
- Path
- A Bezier path.
- PathBuilder 
- A path builder.
- PathSegments Iter 
- A path segments iterator.
- PathStroker 
- A path stroker.
- Pattern
- A pattern shader.
- Pixmap
- A container that owns premultiplied RGBA pixels.
- PixmapMut 
- A container that references mutable premultiplied RGBA pixels.
- PixmapPaint 
- Controls how a pixmap should be blended.
- PixmapRef 
- A container that references premultiplied RGBA pixels.
- Point
- A point.
- PremultipliedColor 
- A premultiplied RGBA color value, holding four floating point components.
- PremultipliedColor U8 
- A 32-bit premultiplied RGBA color value.
- RadialGradient 
- A radial gradient shader.
- Rect
- A rectangle defined by left, top, right and bottom edges.
- Size
- A size.
- Stroke
- Stroke properties.
- StrokeDash 
- A stroke dashing properties.
- Transform
- An affine transformation matrix.
Enums§
- BlendMode 
- A blending mode.
- FillRule 
- A path filling rule.
- FilterQuality 
- Controls how much filtering to be done when transforming images.
- LineCap
- Draws at the beginning and end of an open path contour.
- LineJoin 
- Specifies how corners are drawn when a shape is stroked.
- MaskType 
- A mask type.
- PathSegment 
- A path segment.
- Shader
- A shader specifies the source color(s) for what is being drawn.
- SpreadMode 
- 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.