Module prelude

Source

Modules§

gpu
svg
vk

Structs§

Budgeted
Canvas
Canvas provides an interface for drawing, and how the drawing is clipped and transformed. Canvas contains a stack of Matrix and clip values.
Color
Color4f
CubicResampler
Specify b and c (each between 0…1) to create a shader that applies the corresponding cubic reconstruction filter to the image.
Decoration
FontArguments
FontStyle
FramebufferInfo
GlyphClusterInfo
HSV
IPoint
IRect
ISize
LineMetrics
LocalResourceProvider
A resource provider that loads only local / inline base64 resources.
M44
Matrix
Pixmap
PlaceholderStyle
Point
PositionWithAffinity
RGB
RRect
Rect
SamplingOptions
SaveLayerRec
SaveLayerRec contains the state used to create the layer.
SkColor
SkColor4f
SkMatrix
SkPoint
SkRGB
SkRRect
SkRect
SkTextShadow
TextBox
TextDecoration
Multiple decorations can be applied at once. Ex: Underline and overline is (0x1 | 0x2)
TextShadow
V3
Weight
Wrapper type of a font weight.
Width
Wrapper type for the width of a font.

Enums§

AlphaType
ArcSize
BlendMode
BlurStyle
ClipOp
ColorType
Describes how pixel bits encode color. A pixel may be an alpha mask, a grayscale, RGB, or ARGB.
Corner
EncodedImageFormat
FilterMode
Format
GradientShaderColors
Type that represents either a slice of Color, or a slice of Color4f and a color space. Whenever this type is expected, it’s either possible to directly pass a &[Color] , or a tuple of type (&[Color4f], &ColorSpace).
MipmapMode
PaintStyle
RectHeightStyle
RectWidthStyle
SkArcSize
SkBlurStyle
SkCorner
SkTextAlign
SkTextHeightBehavior
Slant
SurfaceOrigin
TextAlign
TextBaseline
TextDecorationStyle
TextDirection
TextHeightBehavior
TileMode

Traits§

PointerWrapper
This trait supports the conversion of a wrapper into it’s wrapped C/C++ pointer and back.

Functions§

blur
Create a filter that blurs its input by the separate X and Y sigmas. The provided tile mode is used when the blur kernel goes outside the input image.
raster_from_data
Creates CPU-backed Image from pixel data described by info. The pixels data will not be copied.
raster_n32_premul
Allocates raster Surface. crate::Canvas returned by Surface draws directly into pixels. Allocates and zeroes pixel memory. Pixel memory size is height times width times four. Pixel memory is deleted when Surface is deleted.
render_target
Returns Surface on GPU indicated by context. Allocates memory for pixels, based on the width, height, and crate::ColorType in ImageInfo. budgeted selects whether allocation for pixels is tracked by context. image_info describes the pixel format in crate::ColorType, and transparency in crate::AlphaType, and color matching in crate::ColorSpace.
set_resource_cache_single_allocation_byte_limit
set_resource_cache_total_bytes_limit
wrap_backend_render_target
Wraps a GPU-backed buffer into Surface. Caller must ensure backend_render_target is valid for the lifetime of returned Surface.

Type Aliases§

BackendRenderTarget
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.
ColorSpace
Data
DirectContext
FontCollection
FontFeature
FontMgr
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
ImageInfo
Interface
MaskFilter
MaskFilter is the base class for object that perform transformations on the mask before drawing it. An example subclass is Blur.
Paint
Paragraph
ParagraphBuilder
ParagraphStyle
Path
Path contain geometry. Path may be empty, or contain one or more verbs that outline a figure. Path always starts with a move verb to a Cartesian coordinate, and may be followed by additional verbs that add lines or curves. Adding a close verb makes the geometry into a continuous loop, a closed contour. Path may contain any number of contours, each beginning with a move verb.
PathDirection
PathFillType
RecordingContext
RuntimeEffect
Shader
SkData
SkImage
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.
SkMaskFilter
MaskFilter is the base class for object that perform transformations on the mask before drawing it. An example subclass is Blur.
SkParagraph
SkPath
Path contain geometry. Path may be empty, or contain one or more verbs that outline a figure. Path always starts with a move verb to a Cartesian coordinate, and may be followed by additional verbs that add lines or curves. Adding a close verb makes the geometry into a continuous loop, a closed contour. Path may contain any number of contours, each beginning with a move verb.
SkPathFillType
SkSurface
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.
StrutStyle
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.
TextIndex
TextRange
TextStyle
Typeface
TypefaceFontProvider
Uniform