Module prelude
Available on crate feature
engine only.Modules§
Structs§
- Budgeted
- Canvas
Canvasprovides an interface for drawing, and how the drawing is clipped and transformed.Canvascontains a stack ofMatrixand clip values.- Color
- Color4f
- Cubic
Resampler - Specify
bandc(each between 0…1) to create a shader that applies the corresponding cubic reconstruction filter to the image. - Decoration
- Font
Arguments - Font
Style - Framebuffer
Info - Glyph
Cluster Info - HSV
- IPoint
- IRect
- ISize
- Line
Metrics - Local
Resource Provider - A resource provider that loads only local / inline base64 resources.
- M44
- Matrix
- Pixmap
- Placeholder
Style - Point
- Position
With Affinity - RGB
- RRect
- Rect
- Sampling
Options - Save
Layer Rec SaveLayerReccontains the state used to create the layer.- SkColor
- SkColor4f
- SkHSV
- SkMatrix
- SkPoint
- SkRGB
- SkRRect
- SkRect
- SkText
Shadow - TextBox
- Text
Decoration - Multiple decorations can be applied at once. Ex: Underline and overline is (0x1 | 0x2)
- Text
Shadow - V3
- Weight
- Wrapper type of a font weight.
- Width
- Wrapper type for the width of a font.
Enums§
- Alpha
Type - ArcSize
- Blend
Mode - Blur
Style - ClipOp
- Color
Type - Describes how pixel bits encode color. A pixel may be an alpha mask, a grayscale, RGB, or ARGB.
- Corner
- Encoded
Image Format - Filter
Mode - Format
- Gradient
Shader Colors - Type that represents either a slice of
Color, or a slice ofColor4fand a color space. Whenever this type is expected, it’s either possible to directly pass a&[Color], or a tuple of type(&[Color4f], &ColorSpace). - Mipmap
Mode - Paint
Style - Rect
Height Style - Rect
Width Style - SkArc
Size - SkBlur
Style - SkCorner
- SkText
Align - SkText
Height Behavior - Slant
- Surface
Origin - Text
Align - Text
Baseline - Text
Decoration Style - Text
Direction - Text
Height Behavior - Tile
Mode
Traits§
- Pointer
Wrapper - 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
Imagefrom pixel data described by info. The pixels data will not be copied. - raster_
n32_ premul - Allocates raster
Surface.crate::Canvasreturned bySurfacedraws directly into pixels. Allocates and zeroes pixel memory. Pixel memory size is height times width times four. Pixel memory is deleted whenSurfaceis deleted. - render_
target - Returns
Surfaceon GPU indicated by context. Allocates memory for pixels, based on the width, height, andcrate::ColorTypeinImageInfo. budgeted selects whether allocation for pixels is tracked by context.image_infodescribes the pixel format incrate::ColorType, and transparency incrate::AlphaType, and color matching incrate::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 ensurebackend_render_targetis valid for the lifetime of returnedSurface.
Type Aliases§
- Backend
Render Target - 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 to [PixelRef], which describes the physical array of pixels.ImageInfobounds may be located anywhere fully inside [PixelRef] bounds.- Builder
ArcSize - Color
Space - Data
- Direct
Context - Font
Collection - Font
Feature - FontMgr
- Image
Imagedescribes 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.- Image
Filter - Image
Info - Interface
- Mask
Filter - MaskFilter is the base class for object that perform transformations on the mask before drawing it. An example subclass is Blur.
- Paint
- Paragraph
- Paragraph
Builder - Paragraph
Style - Path
Pathcontain geometry.Pathmay be empty, or contain one or more verbs that outline a figure.Pathalways 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.Pathmay contain any number of contours, each beginning with a move verb.- Path
Builder - Path
Direction - Path
Fill Type - Recording
Context - Runtime
Effect - Shader
- SkData
- SkImage
Imagedescribes 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.- SkMask
Filter - MaskFilter is the base class for object that perform transformations on the mask before drawing it. An example subclass is Blur.
- SkParagraph
- SkPath
Pathcontain geometry.Pathmay be empty, or contain one or more verbs that outline a figure.Pathalways 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.Pathmay contain any number of contours, each beginning with a move verb.- SkPath
Fill Type - SkSurface
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.- Strut
Style - 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
Index - Text
Range - Text
Style - Typeface
- Typeface
Font Provider - Uniform