Module vg

Source
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
pdf
perlin_noise_shaderDeprecated
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 of Matrix and clip values.
Codec
Color
Color4f
ColorChannelFlag
ColorSpacePrimaries
ColorSpaceTransferFn
CubicMap
CubicResampler
Specify b and c (each between 0…1) to create a shader that applies the corresponding cubic reconstruction filter to the image.
DateTime
Document
FilterOptionsDeprecated
FontArguments
FontMetrics
FontStyle
FourByteTag
HSV
Handle
Wraps a native type that can be represented in Rust memory.
HighContrastConfig
IPoint
IRect
ISize
IVector
Iter
M44
Matrix
OwnedCanvas
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).
PathSegmentMask
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.
SamplingOptions
Sendable
Size
SurfaceProps
SurfacePropsFlags
TextBlobRun
V2
V3
V4
XYZD50Hash

Enums§

AlphaType
AutoCanvasRestore
BlendMode
BlendModeCoeff
BlurStyle
ClipOp
CodecResult
ColorChannel
ColorType
CoverageMode
EncodedImageFormat
EncodedOrigin
These values match the orientation www.exif.org/Exif2-2.PDF.
FilterMode
FontHinting
MipmapMode
PaintCap
PaintJoin
PaintStyle
PathDirection
PathFillType
PathOp
PathVerb
PixelGeometry
TextEncoding
TextureCompressionType
TileMode
YUVColorSpace

Constants§

EMPTY_IRECT
MILESTONE

Traits§

ConditionallySend
Contains
EncodedText
Trait representing encoded text.
Flattenable
NativeFlattenable
Pixel
Implement this trait to use a pixel type in Handle<Pixmap>::pixels().
QuickReject
RoundOut
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
BBoxHierarchy
Bitmap
Bitmap describes a two-dimensional raster pixel array. Bitmap is built on ImageInfo, containing integer width and height, ColorType and AlphaType describing the pixel format, and ColorSpace describing the range of colors. Bitmap points to PixelRef, 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.
BudgetedDeprecated
Color3f
ColorFilter
ColorInfo
ColorMatrix
ColorSpace
ColorTable
ColorTable holds the lookup tables for each channel (ARGB) used to define the filter behavior of SkColorFilters::Table, and provides a way to share the table data between client code and the returned crate::ColorFilter. Once created, an ColorTable is immutable.
ContourMeasure
ContourMeasureIter
Data
DataTable
Drawable
Font
FontMgr
FontStyleSet
GlyphId
Image
Image describes a two dimensional array of pixels to draw. The pixels may be decoded in a raster bitmap, encoded in a Picture or compressed data stream, or located in GPU memory as a GPU texture.
ImageFilter
ImageGenerator
ImageInfo
MaskFilter
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
PathBuilder
PathEffect
PathMeasure
Picture
PictureRecorder
PixelRef
Region
RuntimeEffect
SamplingModeDeprecated
Shader
Shaper
StrokeRec
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 (a RenderTarget surface). Surface takes care of allocating a Canvas that will draw into the surface. Call surface_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, then None will be returned.
TextBlob
TextBlobBuilder
TextBlobIter
Typeface
Unichar
Vector
Vector3
Vertices
YUVAInfo
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.
YUVAPixmapInfo
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.
YUVAPixmaps
Helper to store Pixmap planes as described by a YUVAPixmapInfo. Can be responsible for allocating/freeing memory for pixmaps or use external memory.
scalar