Crate ruisa

Crate ruisa 

Source
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§

Canvas
A container that owns premultiplied RGBA pixels.
CanvasMut
A container that references mutable premultiplied RGBA pixels.
CanvasPaint
Controls how a canvas should be blended.
CanvasRef
A container that references premultiplied RGBA pixels.
Color
An RGBA color value, holding four floating point components.
ColorF32
A premultiplied RGBA color value, holding four floating point components.
ColorU8
A 32-bit RGBA color value.
GradientStop
A gradient point.
IntRect
An integer rectangle.
LinearGradient
A linear gradient shader.
Mask
A mask.
Paint
Controls how a shape should be painted.
Path
A Bezier path.
PathBuilder
A path builder.
PathSegmentsIter
A path segments iterator.
Pattern
A pattern shader.
Point
A point.
PremultipliedColorU8
A 32-bit premultiplied RGBA color value.
RadialGradient
A radial gradient shader.
Rect
A rectangle defined by left, top, right and bottom edges.
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.