Expand description
Contains types and functions used for custom drawing within views. This is a re-export of skia-safe.
Modules§
- annotate
- arc
- blenders
- canvas
- codec
- color_
filter - color_
filters - color_
matrix - color_
matrix_ filter - colors
- contour_
measure - corner_
path_ effect - dash_
path_ effect - discrete_
path_ effect - document
- drawable
- encode
- font
- font_
arguments - font_
metrics - font_
parameters - font_
style - gpu
- gradient_
shader - graphics
- high_
contrast_ config - high_
contrast_ filter - image
- image_
filter - image_
filters - jpeg_
encoder - line_
2d_ path_ effect - luma_
color_ filter - matrix
- named_
transfer_ fn - overdraw_
color_ filter - paint
- path
- path_
1d_ path_ effect - path_
2d_ path_ effect - path_
effect - path_
measure - path_
types - path_
utils - perlin_
noise_ shader Deprecated - picture_
recorder - png_
encoder - region
- resources
- rrect
- runtime_
effect - sampling_
options - shader
- shader_
mask_ filter - shaders
- shaper
- shapers
- stroke_
rec - surface
- surfaces
- svg
- table_
color_ filter - table_
mask_ filter - textlayout
- tiled_
image_ utils - trim_
path_ effect - typeface
- utils
- vertices
- wrapper
- FFI interoperability for skia-safe’s wrapper types.
- yuva_
info - yuva_
pixmap_ info - yuva_
pixmaps
Macros§
- impl_
default_ make - native_
transmutable - Macro to mark a Rust type as NativeTransmutable and test its layout.
- require_
base_ type - require_
type_ equality - unsafe_
send_ sync - Macro that implements Send and Sync.
- variant_
name - Macro that verifies a variant name at compile time.
Structs§
- Arc
- Represents an arc along an oval boundary, or a closed wedge of the oval.
- Borrows
- Canvas
Canvas
provides an interface for drawing, and how the drawing is clipped and transformed.Canvas
contains a stack ofMatrix
and clip values.- Codec
- Color
- Color4f
- Color
Channel Flag - Color
Space Primaries - Color
Space Transfer Fn - Cubic
Map - Cubic
Resampler - Specify
b
andc
(each between 0…1) to create a shader that applies the corresponding cubic reconstruction filter to the image. - Date
Time - Document
- Filter
Options Deprecated - Font
Arguments - Font
Metrics - Font
Style - Four
Byte Tag - HSV
- Handle
- Wraps a native type that can be represented in Rust memory.
- High
Contrast Config - IPoint
- IRect
- ISize
- IVector
- Iter
- M44
- Matrix
- Owned
Canvas - Represents a
Canvas
that is owned and dropped when it goes out of scope and is bound to the lifetime of some other value (an array of pixels for example). - Path
Segment Mask - Pixmap
- Point
- Point3
- RCHandle
- A wrapper type represented by a reference counted pointer to the native type.
- RGB
- RRect
- RSXform
- Rect
- RefHandle
- A wrapper type that represents a native type with a pointer to the native object.
- Sampling
Options - Sendable
- Size
- Surface
Props - Surface
Props Flags - Text
Blob Run - V2
- V3
- V4
- XYZD50
Hash
Enums§
- Alpha
Type - Auto
Canvas Restore - Blend
Mode - Blend
Mode Coeff - Blur
Style - ClipOp
- Codec
Result - Color
Channel - Color
Type - Coverage
Mode - Encoded
Image Format - Encoded
Origin - These values match the orientation www.exif.org/Exif2-2.PDF.
- Filter
Mode - Font
Hinting - Mipmap
Mode - Paint
Cap - Paint
Join - Paint
Style - Path
Direction - Path
Fill Type - PathOp
- Path
Verb - Pixel
Geometry - Text
Encoding - Texture
Compression Type - Tile
Mode - YUVColor
Space
Constants§
Traits§
- Conditionally
Send - Contains
- Encoded
Text - Trait representing encoded text.
- Flattenable
- Native
Flattenable - Pixel
- Implement this trait to use a pixel type in
Handle<Pixmap>::pixels()
. - Quick
Reject - Round
Out - Scalar
- Scalars
Functions§
- as_
utf16_ ⚠unchecked - Treat a
&[u16]
as UTF16 encoded text. - as_
utf32_ ⚠unchecked - Treat a
&[u32]
as UTF32 encoded text. - as_
winding - op
- pre_
multiply_ argb - pre_
multiply_ color - radians_
to_ degrees - simplify
- swap_rb
- swap_
rb_ inplace - tight_
bounds
Type Aliases§
- BBHFactory
- BBox
Hierarchy - Bitmap
Bitmap
describes a two-dimensional raster pixel array.Bitmap
is built onImageInfo
, containing integer width and height,ColorType
andAlphaType
describing the pixel format, andColorSpace
describing the range of colors.Bitmap
points toPixelRef
, which describes the physical array of pixels.ImageInfo
bounds may be located anywhere fully inside PixelRef bounds.- Blender
Blender
represents a custom blend function in the Skia pipeline. A blender combines a source color (the result of our paint) and destination color (from the canvas) into a final color.- Budgeted
Deprecated - Color3f
- Color
Filter - Color
Info - Color
Matrix - Color
Space - Color
Table ColorTable
holds the lookup tables for each channel (ARGB) used to define the filter behavior ofSkColorFilters::Table
, and provides a way to share the table data between client code and the returnedcrate::ColorFilter
. Once created, anColorTable
is immutable.- Contour
Measure - Contour
Measure Iter - Data
- Data
Table - Drawable
- Font
- FontMgr
- Font
Style Set - GlyphId
- Image
Image
describes a two dimensional array of pixels to draw. The pixels may be decoded in a raster bitmap, encoded in aPicture
or compressed data stream, or located in GPU memory as a GPU texture.- Image
Filter - Image
Generator - Image
Info - Mask
Filter - MaskFilter is the base class for object that perform transformations on the mask before drawing it. An example subclass is Blur.
- OpBuilder
- PMColor
- Paint
- Path
- Path
Builder - Path
Effect - Path
Measure - Picture
- Picture
Recorder - Pixel
Ref - Region
- Runtime
Effect - Sampling
Mode Deprecated - Shader
- Shaper
- Stroke
Rec - Surface
Surface
is responsible for managing the pixels that a canvas draws into. The pixels can be allocated either in CPU memory (a raster surface) or on the GPU (aRenderTarget
surface).Surface
takes care of allocating aCanvas
that will draw into the surface. Callsurface_get_canvas()
to use that canvas (but don’t delete it, it is owned by the surface).Surface
always has non-zero dimensions. If there is a request for a new surface, and either of the requested dimensions are zero, thenNone
will be returned.- Text
Blob - Text
Blob Builder - Text
Blob Iter - Typeface
- Unichar
- Vector
- Vector3
- Vertices
- YUVA
Info - Specifies the structure of planes for a YUV image with optional alpha. The actual planar data is not part of this structure and depending on usage is in external textures or pixmaps.
- YUVA
Pixmap Info - YUVAInfo combined with per-plane ColorTypes and row bytes. Fully specifies the Pixmap`s for a YUVA image without the actual pixel memory and data.
- YUVA
Pixmaps - Helper to store Pixmap planes as described by a YUVAPixmapInfo. Can be responsible for allocating/freeing memory for pixmaps or use external memory.
- scalar