Module vg
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_
primaries - Color primaries defined by ITU-T H.273, table 2. Names are given by the first specification referenced in the value’s row.
- 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
Canvasprovides an interface for drawing, and how the drawing is clipped and transformed.Canvascontains a stack ofMatrixand clip values.- Codec
- Color
- Color4f
- Color
Channel Flag - Color
Space Primaries - Color
Space Transfer Fn - Cubic
Map - Cubic
Resampler - Specify
bandc(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
Canvasthat 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 - Describes how pixel bits encode color. A pixel may be an alpha mask, a grayscale, RGB, or ARGB.
- 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 Deprecated
Type Aliases§
- BBHFactory
- BBox
Hierarchy - Bitmap
Bitmapdescribes a two-dimensional raster pixel array.Bitmapis built onImageInfo, containing integer width and height,ColorTypeandAlphaTypedescribing the pixel format, andColorSpacedescribing the range of colors.Bitmappoints toPixelRef, which describes the physical array of pixels.ImageInfobounds may be located anywhere fully inside PixelRef bounds.- Blender
Blenderrepresents 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 ColorTableholds 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, anColorTableis immutable.- Contour
Measure - Contour
Measure Iter - Data
- Data
Table - Drawable
- Font
- FontMgr
- Font
Style Set - GlyphId
- Image
Imagedescribes a two dimensional array of pixels to draw. The pixels may be decoded in a raster bitmap, encoded in aPictureor 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
Surfaceis 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 (aRenderTargetsurface).Surfacetakes care of allocating aCanvasthat will draw into the surface. Callsurface_get_canvas()to use that canvas (but don’t delete it, it is owned by the surface).Surfacealways has non-zero dimensions. If there is a request for a new surface, and either of the requested dimensions are zero, thenNonewill 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