skia_safe::textlayout

Type Alias TypefaceFontProvider

Source
pub type TypefaceFontProvider = RCHandle<skia_textlayout_TypefaceFontProvider>;

Aliased Type§

struct TypefaceFontProvider(/* private fields */);

Implementations§

Source§

impl TypefaceFontProvider

Source

pub fn new() -> Self

Source

pub fn register_typeface<'a>( &mut self, typeface: Typeface, alias: impl Into<Option<&'a str>>, ) -> usize

Methods from Deref<Target = FontMgr>§

Source

pub fn to_a_color_mode(&self) -> Option<(Color, BlendMode)>

If the filter can be represented by a source color plus Mode, this returns the color and mode appropriately. If not, this returns None and ignores the parameters.

Source

pub fn to_a_color_matrix(&self) -> Option<[scalar; 20]>

If the filter can be represented by a 5x4 matrix, this returns the matrix appropriately. If not, this returns None and ignores the parameter.

Source

pub fn is_alpha_unchanged(&self) -> bool

Returns true if the filter is guaranteed to never change the alpha of a color it filters.

Source

pub fn filter_color(&self, color: impl Into<Color>) -> Color

👎Deprecated since 0.79.0: Use filter_color4f()
Source

pub fn filter_color4f( &self, color: impl Into<Color4f>, src_color_space: Option<&ColorSpace>, dst_color_space: Option<&ColorSpace>, ) -> Color4f

Converts the src color (in src colorspace), into the dst colorspace, then applies this filter to it, returning the filtered color in the dst colorspace.

Source

pub fn composed(&self, inner: impl Into<ColorFilter>) -> Option<Self>

Construct a color filter whose effect is to first apply the inner filter and then apply this filter, applied to the output of the inner filter.

result = this(inner(…))

Source

pub fn with_working_color_space( &self, color_space: impl Into<ColorSpace>, ) -> Option<Self>

Return a color filter that will compute this filter in a specific color space. By default all filters operate in the destination (surface) color space. This allows filters like Blend and Matrix, or runtime color filters to perform their math in a known space.

Source

pub fn to_xyzd50_hash(&self) -> XYZD50Hash

Source

pub fn with_linear_gamma(&self) -> Self

Source

pub fn with_srgb_gamma(&self) -> Self

Source

pub fn with_color_spin(&self) -> Self

Source

pub fn is_srgb(&self) -> bool

Source

pub fn serialize(&self) -> Data

Source

pub fn alpha_table(&self) -> &[u8; 256]

Source

pub fn red_table(&self) -> &[u8; 256]

Source

pub fn green_table(&self) -> &[u8; 256]

Source

pub fn blue_table(&self) -> &[u8; 256]

Source

pub fn length(&self) -> scalar

Source

pub fn pos_tan(&self, distance: scalar) -> Option<(Point, Vector)>

Source

pub fn get_matrix( &self, distance: scalar, flags: impl Into<Option<MatrixFlags>>, ) -> Option<Matrix>

Source

pub fn segment( &self, start_d: scalar, stop_d: scalar, start_with_move_to: bool, ) -> Option<Path>

Source

pub fn is_closed(&self) -> bool

Source

pub fn verbs(&self) -> ForwardVerbIterator<'_>

Source

pub fn size(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn as_bytes(&self) -> &[u8]

Source

pub fn copy_range(&self, offset: usize, buffer: &mut [u8]) -> &Self

Source

pub fn is_empty(&self) -> bool

Source

pub fn count(&self) -> usize

Source

pub fn at_size(&self, index: usize) -> usize

Source

pub fn at(&self, index: usize) -> &[u8]

Source

pub unsafe fn at_t<T: Copy>(&self, index: usize) -> &[T]

Source

pub fn at_str(&self, index: usize) -> &CStr

Source

pub fn iter(&self) -> Iter<'_>

Source

pub fn draw(&mut self, canvas: &Canvas, matrix: Option<&Matrix>)

Source

pub fn draw_at(&mut self, canvas: &Canvas, point: impl Into<Point>)

Source

pub fn snap_gpu_draw_handler( &mut self, api: BackendAPI, matrix: &Matrix, clip_bounds: impl Into<IRect>, buffer_info: &ImageInfo, ) -> Option<GPUDrawHandler>

Source

pub fn make_picture_snapshot(&mut self) -> Picture

Source

pub fn generation_id(&mut self) -> u32

Source

pub fn bounds(&mut self) -> Rect

Source

pub fn approximate_bytes_used(&mut self) -> usize

Source

pub fn notify_drawing_changed(&mut self)

Source

pub fn count(&mut self) -> usize

Source

pub fn style(&mut self, index: usize) -> (FontStyle, Option<String>)

Source

pub fn new_typeface(&mut self, index: usize) -> Option<Typeface>

Source

pub fn match_style(&mut self, pattern: FontStyle) -> Option<Typeface>

Source

pub fn count_families(&self) -> usize

Source

pub fn family_name(&self, index: usize) -> String

Source

pub fn family_names(&self) -> impl Iterator<Item = String> + use<'_>

Source

pub fn new_styleset(&self, index: usize) -> FontStyleSet

👎Deprecated since 0.41.0: Use new_style_set
Source

pub fn new_style_set(&self, index: usize) -> FontStyleSet

Source

pub fn match_family(&self, family_name: impl AsRef<str>) -> FontStyleSet

Source

pub fn match_family_style( &self, family_name: impl AsRef<str>, style: FontStyle, ) -> Option<Typeface>

Source

pub fn match_family_style_character( &self, family_name: impl AsRef<str>, style: FontStyle, bcp_47: &[&str], character: Unichar, ) -> Option<Typeface>

Source

pub fn match_face_style( &self, _typeface: impl AsRef<Typeface>, _style: FontStyle, ) -> !

👎Deprecated since 0.35.0: Removed without replacement
Source

pub fn new_from_data( &self, bytes: &[u8], ttc_index: impl Into<Option<usize>>, ) -> Option<Typeface>

Source

pub fn legacy_make_typeface<'a>( &self, family_name: impl Into<Option<&'a str>>, style: FontStyle, ) -> Option<Typeface>

Source

pub fn image_info(&self) -> &ImageInfo

Returns a ImageInfo describing the width, height, color type, alpha type, and color space of the Image.

Returns: image info of Image.

Source

pub fn width(&self) -> i32

Returns pixel count in each row.

Returns: pixel width in Image

Source

pub fn height(&self) -> i32

Returns pixel row count.

Returns: pixel height in Image

Source

pub fn dimensions(&self) -> ISize

Returns ISize { width(), height() }.

Returns: integral size of width() and height()

Source

pub fn bounds(&self) -> IRect

Returns IRect { 0, 0, width(), height() }.

Returns: integral rectangle from origin to width() and height()

Source

pub fn unique_id(&self) -> u32

Returns value unique to image. Image contents cannot change after Image is created. Any operation to create a new Image will receive generate a new unique number.

Returns: unique identifier

Source

pub fn alpha_type(&self) -> AlphaType

Returns AlphaType.

AlphaType returned was a parameter to an Image constructor, or was parsed from encoded data.

Returns: AlphaType in Image

example: https://fiddle.skia.org/c/@Image_alphaType

Source

pub fn color_type(&self) -> ColorType

Returns ColorType if known; otherwise, returns ColorType::Unknown.

Returns: ColorType of Image

example: https://fiddle.skia.org/c/@Image_colorType

Source

pub fn color_space(&self) -> ColorSpace

Returns a smart pointer to ColorSpace, the range of colors, associated with Image. The smart pointer tracks the number of objects sharing this ColorSpace reference so the memory is released when the owners destruct.

The returned ColorSpace is immutable.

ColorSpace returned was passed to an Image constructor, or was parsed from encoded data. ColorSpace returned may be ignored when Image is drawn, depending on the capabilities of the crate::Surface receiving the drawing.

Returns: ColorSpace in Image, or None, wrapped in a smart pointer

example: https://fiddle.skia.org/c/@Image_refColorSpace

Source

pub fn is_alpha_only(&self) -> bool

Returns true if Image pixels represent transparency only. If true, each pixel is packed in 8 bits as defined by ColorType::Alpha8.

Returns: true if pixels represent a transparency mask

example: https://fiddle.skia.org/c/@Image_isAlphaOnly

Source

pub fn is_opaque(&self) -> bool

Returns true if pixels ignore their alpha value and are treated as fully opaque.

Returns: true if AlphaType is AlphaType::Opaque

Source

pub fn to_shader<'a>( &self, tile_modes: impl Into<Option<(TileMode, TileMode)>>, sampling: impl Into<SamplingOptions>, local_matrix: impl Into<Option<&'a Matrix>>, ) -> Option<Shader>

Make a shader with the specified tiling and mipmap sampling.

Source

pub fn to_raw_shader<'a>( &self, tile_modes: impl Into<Option<(TileMode, TileMode)>>, sampling: impl Into<SamplingOptions>, local_matrix: impl Into<Option<&'a Matrix>>, ) -> Option<Shader>

to_raw_shader functions like to_shader, but for images that contain non-color data. This includes images encoding things like normals, material properties (eg, roughness), heightmaps, or any other purely mathematical data that happens to be stored in an image. These types of images are useful with some programmable shaders (see: crate::RuntimeEffect).

Raw image shaders work like regular image shaders (including filtering and tiling), with a few major differences:

  • No color space transformation is ever applied (the color space of the image is ignored).
  • Images with an alpha type of Unpremul are not automatically premultiplied.
  • Bicubic filtering is not supported. If SamplingOptions::use_cubic is true, these factories will return None.
Source

pub fn peek_pixels(&self) -> Option<Pixmap<'_>>

Copies Image pixel address, row bytes, and ImageInfo to pixmap, if address is available, and returns true. If pixel address is not available, return false and leave pixmap unchanged.

  • pixmap storage for pixel state if pixels are readable; otherwise, ignored

Returns: true if Image has direct access to pixels

example: https://fiddle.skia.org/c/@Image_peekPixels

Source

pub fn is_texture_backed(&self) -> bool

Returns true if the contents of Image was created on or uploaded to GPU memory, and is available as a GPU texture.

Returns: true if Image is a GPU texture

example: https://fiddle.skia.org/c/@Image_isTextureBacked

Source

pub fn texture_size(&self) -> usize

Returns an approximation of the amount of texture memory used by the image. Returns zero if the image is not texture backed or if the texture has an external format.

Source

pub fn is_valid(&self, context: &mut RecordingContext) -> bool

Returns true if Image can be drawn on either raster surface or GPU surface. If context is None, tests if Image draws on raster surface; otherwise, tests if Image draws on GPU surface associated with context.

Image backed by GPU texture may become invalid if associated context is invalid. lazy image may be invalid and may not draw to raster surface or GPU surface or both.

  • context GPU context

Returns: true if Image can be drawn

example: https://fiddle.skia.org/c/@Image_isValid

Source

pub fn make_scaled( &self, info: &ImageInfo, scaling: impl Into<SamplingOptions>, ) -> Option<Image>

Create a new image by copying this image and scaling to fit the ImageInfo’s dimensions and converting the pixels into the ImageInfo’s crate::ColorInfo.

This is done retaining the domain (backend) of the image (e.g. gpu, raster).

Returns None if the requested crate::ColorInfo is not supported, its dimensions are out of range.

Source

pub fn flush<'a>( &self, context: &mut DirectContext, flush_info: impl Into<Option<&'a FlushInfo>>, ) -> SemaphoresSubmitted

👎Deprecated since 0.63.0: use gpu::DirectContext::flush()
Source

pub fn flush_with_info( &self, context: &mut DirectContext, flush_info: &FlushInfo, ) -> SemaphoresSubmitted

👎Deprecated since 0.46.0: use gpu::DirectContext::flush()

Flushes any pending uses of texture-backed images in the GPU backend. If the image is not texture-backed (including promise texture images) or if the gpu::DirectContext does not have the same context ID as the context backing the image then this is a no-op.

If the image was not used in any non-culled draws in the current queue of work for the passed gpu::DirectContext then this is a no-op unless the gpu::FlushInfo contains semaphores or a finish proc. Those are respected even when the image has not been used.

  • context the context on which to flush pending usages of the image.
  • info flush options
Source

pub fn flush_and_submit(&self, context: &mut DirectContext)

👎Deprecated since 0.63.0: use gpu::DirectContext::flush_and_submit()

Version of flush() that uses a default gpu::FlushInfo. Also submits the flushed work to the GPU.

Source

pub fn backend_texture( &self, flush_pending_gr_context_io: bool, ) -> Option<(BackendTexture, SurfaceOrigin)>

👎Deprecated since 0.63.0: use gpu::images::get_backend_texture_from_image()

Retrieves the back-end texture. If Image has no back-end texture, Noneis returned.

If flush_pending_gr_context_io is true, completes deferred I/O operations.

If origin in not None, copies location of content drawn into Image.

  • flush_pending_gr_context_io flag to flush outstanding requests

Returns: back-end API texture handle; invalid on failure

Source

pub fn read_pixels_with_context<'a, P>( &self, context: impl Into<Option<&'a mut DirectContext>>, dst_info: &ImageInfo, pixels: &mut [P], dst_row_bytes: usize, src: impl Into<IPoint>, caching_hint: CachingHint, ) -> bool

Copies crate::Rect of pixels from Image to dst_pixels. Copy starts at offset (src_x, src_y), and does not exceed Image (width(), height()).

Graphite has deprecated this API in favor of the equivalent asynchronous API on skgpu::graphite::Context (with an optional explicit synchronization).

dst_info specifies width, height, ColorType, AlphaType, and ColorSpace of destination. dst_row_bytes specifies the gap from one destination row to the next. Returns true if pixels are copied. Returns false if:

  • dst_info.addr() equals None
  • dst_row_bytes is less than dst_info.min_row_bytes()
  • crate::PixelRef is None

Pixels are copied only if pixel conversion is possible. If Image ColorType is ColorType::Gray8, or ColorType::Alpha8; dst_info.color_type() must match. If Image ColorType is ColorType::Gray8, dst_info.color_space() must match. If Image AlphaType is AlphaType::Opaque, dst_info.alpha_type() must match. If Image ColorSpace is None, dst_info.color_space() must match. Returns false if pixel conversion is not possible.

src_x and src_y may be negative to copy only top or left of source. Returns false if width() or height() is zero or negative. Returns false if abs(src_x) >= Image width(), or if abs(src_y) >= Image height().

If caching_hint is CachingHint::Allow, pixels may be retained locally. If caching_hint is CachingHint::Disallow, pixels are not added to the local cache.

  • context the gpu::DirectContext in play, if it exists
  • dst_info destination width, height, ColorType, AlphaType, ColorSpace
  • dst_pixels destination pixel storage
  • dst_row_bytes destination row length
  • src_x column index whose absolute value is less than width()
  • src_y row index whose absolute value is less than height()
  • caching_hint whether the pixels should be cached locally

Returns: true if pixels are copied to dst_pixels

Source

pub fn read_pixels_to_pixmap_with_context<'a>( &self, context: impl Into<Option<&'a mut DirectContext>>, dst: &Pixmap<'_>, src: impl Into<IPoint>, caching_hint: CachingHint, ) -> bool

Copies a crate::Rect of pixels from Image to dst. Copy starts at (src_x, src_y), and does not exceed Image (width(), height()).

Graphite has deprecated this API in favor of the equivalent asynchronous API on skgpu::graphite::Context (with an optional explicit synchronization).

dst specifies width, height, ColorType, AlphaType, ColorSpace, pixel storage, and row bytes of destination. dst.row_bytes() specifics the gap from one destination row to the next. Returns true if pixels are copied. Returns false if:

Pixels are copied only if pixel conversion is possible. If Image ColorType is ColorType::Gray8, or ColorType::Alpha8; dst.color_type() must match. If Image ColorType is ColorType::Gray8, dst.color_space() must match. If Image AlphaType is AlphaType::Opaque, dst.alpha_type() must match. If Image ColorSpace is None, dst.color_space() must match. Returns false if pixel conversion is not possible.

src_x and src_y may be negative to copy only top or left of source. Returns false if width() or height() is zero or negative. Returns false if abs(src_x) >= Image width(), or if abs(src_y) >= Image height().

If caching_hint is CachingHint::Allow, pixels may be retained locally. If caching_hint is CachingHint::Disallow, pixels are not added to the local cache.

  • context the gpu::DirectContext in play, if it exists
  • dst destination Pixmap:ImageInfo, pixels, row bytes
  • src_x column index whose absolute value is less than width()
  • src_y row index whose absolute value is less than height()
  • caching_hint whether the pixels should be cached locally_z

Returns: true if pixels are copied to dst

Source

pub fn read_pixels<P>( &self, dst_info: &ImageInfo, pixels: &mut [P], dst_row_bytes: usize, src: impl Into<IPoint>, caching_hint: CachingHint, ) -> bool

Source

pub unsafe fn read_pixels_to_pixmap( &self, dst: &Pixmap<'_>, src: impl Into<IPoint>, caching_hint: CachingHint, ) -> bool

Source

pub fn scale_pixels( &self, dst: &Pixmap<'_>, sampling: impl Into<SamplingOptions>, caching_hint: impl Into<Option<CachingHint>>, ) -> bool

Copies Image to dst, scaling pixels to fit dst.width() and dst.height(), and converting pixels to match dst.color_type() and dst.alpha_type(). Returns true if pixels are copied. Returns false if dst.addr() is None, or dst.row_bytes() is less than dst ImageInfo::min_row_bytes.

Pixels are copied only if pixel conversion is possible. If Image ColorType is ColorType::Gray8, or ColorType::Alpha8; dst.color_type() must match. If Image ColorType is ColorType::Gray8, dst.color_space() must match. If Image AlphaType is AlphaType::Opaque, dst.alpha_type() must match. If Image ColorSpace is None, dst.color_space() must match. Returns false if pixel conversion is not possible.

If caching_hint is CachingHint::Allow, pixels may be retained locally. If caching_hint is CachingHint::Disallow, pixels are not added to the local cache.

Returns: true if pixels are scaled to fit dst

Source

pub fn encode_to_data_with_context( &self, context: impl Into<Option<DirectContext>>, image_format: EncodedImageFormat, quality: impl Into<Option<u32>>, ) -> Option<Data>

👎Deprecated since 0.63.0: Use encode

Encodes Image pixels, returning result as Data.

Returns None if encoding fails, or if encoded_image_format is not supported.

Image encoding in a format requires both building with one or more of: SK_ENCODE_JPEG, SK_ENCODE_PNG, SK_ENCODE_WEBP; and platform support for the encoded format.

If SK_BUILD_FOR_MAC or SK_BUILD_FOR_IOS is defined, encoded_image_format can additionally be one of: EncodedImageFormat::ICO, EncodedImageFormat::BMP, EncodedImageFormat::GIF.

quality is a platform and format specific metric trading off size and encoding error. When used, quality equaling 100 encodes with the least error. quality may be ignored by the encoder.

Returns: encoded Image, or None

example: https://fiddle.skia.org/c/@Image_encodeToData

Source

pub fn encode_to_data(&self, image_format: EncodedImageFormat) -> Option<Data>

👎Deprecated since 0.63.0: Support for encoding GPU backed images without a context was removed, use encode_to_data_with_context instead
Source

pub fn encode_to_data_with_quality( &self, image_format: EncodedImageFormat, quality: u32, ) -> Option<Data>

👎Deprecated since 0.63.0: Support for encoding GPU backed images without a context was removed, use encode_to_data_with_context instead

Encodes Image pixels, returning result as Data.

Returns None if encoding fails, or if encoded_image_format is not supported.

Image encoding in a format requires both building with one or more of: SK_ENCODE_JPEG, SK_ENCODE_PNG, SK_ENCODE_WEBP; and platform support for the encoded format.

If SK_BUILD_FOR_MAC or SK_BUILD_FOR_IOS is defined, encoded_image_format can additionally be one of: EncodedImageFormat::ICO, EncodedImageFormat::BMP, EncodedImageFormat::GIF.

quality is a platform and format specific metric trading off size and encoding error. When used, quality equaling 100 encodes with the least error. quality may be ignored by the encoder.

Returns: encoded Image, or None

example: https://fiddle.skia.org/c/@Image_encodeToData

Source

pub fn encoded_data(&self) -> Option<Data>

Returns encoded Image pixels as Data, if Image was created from supported encoded stream format. Platform support for formats vary and may require building with one or more of: SK_ENCODE_JPEG, SK_ENCODE_PNG, SK_ENCODE_WEBP.

Returns None if Image contents are not encoded.

Returns: encoded Image, or None

example: https://fiddle.skia.org/c/@Image_refEncodedData

Source

pub fn new_subset(&self, rect: impl AsRef<IRect>) -> Option<Image>

👎Deprecated since 0.64.0: use make_subset()
Source

pub fn new_subset_with_context<'a>( &self, rect: impl AsRef<IRect>, direct: impl Into<Option<&'a mut DirectContext>>, ) -> Option<Image>

👎Deprecated since 0.64.0: use make_subset()

Returns subset of this image.

Returns None if any of the following are true:

  • Subset is empty
  • Subset is not contained inside the image’s bounds
  • Pixels in the image could not be read or copied

If this image is texture-backed, the context parameter is required and must match the context of the source image. If the context parameter is provided, and the image is raster-backed, the subset will be converted to texture-backed.

Returns: the subsetted image, or None

example: https://fiddle.skia.org/c/@Image_makeSubset

Source

pub fn make_subset<'a>( &self, direct: impl Into<Option<&'a mut DirectContext>>, subset: impl AsRef<IRect>, ) -> Option<Image>

Returns subset of this image.

Returns None if any of the following are true: - Subset is empty - Subset is not contained inside the image’s bounds - Pixels in the source image could not be read or copied - This image is texture-backed and the provided context is null or does not match the source image’s context.

If the source image was texture-backed, the resulting image will be texture-backed also. Otherwise, the returned image will be raster-backed.

  • direct - the gpu::DirectContext of the source image (None is ok if the source image is not texture-backed).
  • subset - bounds of returned Image Returns: the subsetted image, or None

example: https://fiddle.skia.org/c/@Image_makeSubset

Source

pub fn has_mipmaps(&self) -> bool

Returns true if the image has mipmap levels.

Source

pub fn with_default_mipmaps(&self) -> Option<Image>

Returns an image with the same “base” pixels as the this image, but with mipmap levels automatically generated and attached.

Source

pub fn new_texture_image( &self, context: &mut DirectContext, mipmapped: Mipmapped, ) -> Option<Image>

Source

pub fn new_texture_image_budgeted( &self, direct_context: &mut DirectContext, mipmapped: Mipmapped, budgeted: Budgeted, ) -> Option<Image>

Returns Image backed by GPU texture associated with context. Returned Image is compatible with crate::Surface created with dst_color_space. The returned Image respects mipmapped setting; if mipmapped equals gpu::Mipmapped::Yes, the backing texture allocates mip map levels.

The mipmapped parameter is effectively treated as No if MIP maps are not supported by the GPU.

Returns original Image if the image is already texture-backed, the context matches, and mipmapped is compatible with the backing GPU texture. crate::Budgeted is ignored in this case.

Returns None if context is None, or if Image was created with another gpu::DirectContext.

  • direct_context the gpu::DirectContext in play, if it exists
  • mipmapped whether created Image texture must allocate mip map levels
  • budgeted whether to count a newly created texture for the returned image counts against the context’s budget.

Returns: created Image, or None

Source

pub fn to_non_texture_image(&self) -> Option<Image>

👎Deprecated since 0.64.0: use make_non_texture_image()

Returns raster image or lazy image. Copies Image backed by GPU texture into CPU memory if needed. Returns original Image if decoded in raster bitmap, or if encoded in a stream.

Returns None if backed by GPU texture and copy fails.

Returns: raster image, lazy image, or None

example: https://fiddle.skia.org/c/@Image_makeNonTextureImage

Source

pub fn make_non_texture_image<'a>( &self, context: impl Into<Option<&'a mut DirectContext>>, ) -> Option<Image>

Returns raster image or lazy image. Copies Image backed by GPU texture into CPU memory if needed. Returns original Image if decoded in raster bitmap, or if encoded in a stream.

Returns None if backed by GPU texture and copy fails.

Returns: raster image, lazy image, or None

example: https://fiddle.skia.org/c/@Image_makeNonTextureImage

Source

pub fn to_raster_image( &self, caching_hint: impl Into<Option<CachingHint>>, ) -> Option<Image>

👎Deprecated since 0.64.0: use make_raster_image()

Returns raster image. Copies Image backed by GPU texture into CPU memory, or decodes Image from lazy image. Returns original Image if decoded in raster bitmap.

Returns None if copy, decode, or pixel read fails.

If caching_hint is CachingHint::Allow, pixels may be retained locally. If caching_hint is CachingHint::Disallow, pixels are not added to the local cache.

Returns: raster image, or None

example: https://fiddle.skia.org/c/@Image_makeRasterImage

Source

pub fn make_raster_image<'a>( &self, context: impl Into<Option<&'a mut DirectContext>>, caching_hint: impl Into<Option<CachingHint>>, ) -> Option<Image>

Returns raster image. Copies Image backed by GPU texture into CPU memory, or decodes Image from lazy image. Returns original Image if decoded in raster bitmap.

Returns None if copy, decode, or pixel read fails.

If caching_hint is CachingHint::Allow, pixels may be retained locally. If caching_hint is CachingHint::Disallow, pixels are not added to the local cache.

Returns: raster image, or None

example: https://fiddle.skia.org/c/@Image_makeRasterImage

Source

pub fn new_with_filter( &self, _context: Option<&mut RecordingContext>, filter: &ImageFilter, clip_bounds: impl Into<IRect>, subset: impl Into<IRect>, ) -> Option<(Image, IRect, IPoint)>

👎Deprecated since 0.67.0: use images::make_with_filter()

Creates filtered Image. filter processes original Image, potentially changing color, position, and size. subset is the bounds of original Image processed by filter. clip_bounds is the expected bounds of the filtered Image. out_subset is required storage for the actual bounds of the filtered Image. offset is required storage for translation of returned Image.

Returns None if Image could not be created or if the recording context provided doesn’t match the GPU context in which the image was created. If None is returned, out_subset and offset are undefined.

Useful for animation of ImageFilter that varies size from frame to frame. Returned Image is created larger than required by filter so that GPU texture can be reused with different sized effects. out_subset describes the valid bounds of GPU texture returned. offset translates the returned Image to keep subsequent animation frames aligned with respect to each other.

  • context the gpu::RecordingContext in play - if it exists
  • filter how Image is sampled when transformed
  • subset bounds of Image processed by filter
  • clip_bounds expected bounds of filtered Image
  • out_subset storage for returned Image bounds
  • offset storage for returned Image translation

Returns: filtered Image, or None

Source

pub fn is_lazy_generated(&self) -> bool

Returns true if Image is backed by an image-generator or other service that creates and caches its pixels or texture on-demand.

Returns: true if Image is created as needed

example: https://fiddle.skia.org/c/@Image_isLazyGenerated_a example: https://fiddle.skia.org/c/@Image_isLazyGenerated_b

Source

pub fn new_color_space( &self, color_space: impl Into<Option<ColorSpace>>, ) -> Option<Image>

👎Deprecated since 0.64.0: use make_color_space()
Source

pub fn new_color_space_with_context<'a>( &self, color_space: impl Into<Option<ColorSpace>>, direct: impl Into<Option<&'a mut DirectContext>>, ) -> Option<Image>

👎Deprecated since 0.64.0: use make_color_space()

Creates Image in target ColorSpace. Returns None if Image could not be created.

Returns original Image if it is in target ColorSpace. Otherwise, converts pixels from Image ColorSpace to target ColorSpace. If Image color_space() returns None, Image ColorSpace is assumed to be s_rgb.

If this image is texture-backed, the context parameter is required and must match the context of the source image.

Returns: created Image in target ColorSpace

example: https://fiddle.skia.org/c/@Image_makeColorSpace

Source

pub fn make_color_space<'a>( &self, direct: impl Into<Option<&'a mut DirectContext>>, color_space: impl Into<Option<ColorSpace>>, ) -> Option<Image>

Creates Image in target ColorSpace. Returns None if Image could not be created.

Returns original Image if it is in target ColorSpace. Otherwise, converts pixels from Image ColorSpace to target ColorSpace. If Image color_space() returns None, Image ColorSpace is assumed to be s_rgb.

If this image is texture-backed, the context parameter is required and must match the context of the source image.

Returns: created Image in target ColorSpace

example: https://fiddle.skia.org/c/@Image_makeColorSpace

Source

pub fn reinterpret_color_space( &self, new_color_space: impl Into<ColorSpace>, ) -> Option<Image>

Creates a new Image identical to this one, but with a different ColorSpace. This does not convert the underlying pixel data, so the resulting image will draw differently.

Source

pub fn filter_bounds<'a>( &self, src: impl AsRef<IRect>, ctm: &Matrix, map_direction: MapDirection, input_rect: impl Into<Option<&'a IRect>>, ) -> IRect

Source

pub fn color_filter_node(&self) -> Option<ColorFilter>

Source

pub fn to_a_color_filter(&self) -> Option<ColorFilter>

Source

pub fn count_inputs(&self) -> usize

Source

pub fn input(&self, i: usize) -> Option<ImageFilter>

👎Deprecated: use get_input()
Source

pub fn get_input(&self, i: usize) -> Option<ImageFilter>

Source

pub fn inputs(&self) -> impl Iterator<Item = Option<ImageFilter>> + use<'_>

Source

pub fn compute_fast_bounds(&self, bounds: impl AsRef<Rect>) -> Rect

Source

pub fn can_compute_fast_bounds(&self) -> bool

Source

pub fn with_local_matrix(&self, matrix: &Matrix) -> Option<ImageFilter>

Source

pub fn approximate_filtered_bounds(&self, src: impl AsRef<Rect>) -> Rect

Returns the approximate bounds that would result from filtering the src rect. The actual result may be different, but it should be contained within the returned bounds.

Source

pub fn with_matrix(&self, _matrix: &Matrix) -> !

👎Deprecated since 0.29.0: removed without replacement
Source

pub fn filter_path( &self, src: &Path, stroke_rec: &StrokeRec, cull_rect: impl AsRef<Rect>, ) -> Option<(Path, StrokeRec)>

Source

pub fn filter_path_inplace( &self, dst: &mut Path, src: &Path, stroke_rec: &mut StrokeRec, cull_rect: impl AsRef<Rect>, ) -> bool

Source

pub fn filter_path_inplace_with_matrix( &self, dst: &mut Path, src: &Path, stroke_rec: &mut StrokeRec, cull_rect: impl AsRef<Rect>, ctm: &Matrix, ) -> bool

Source

pub fn needs_ctm(&self) -> bool

Source

pub fn playback(&self, canvas: &Canvas)

Source

pub fn cull_rect(&self) -> Rect

Source

pub fn unique_id(&self) -> u32

Source

pub fn serialize(&self) -> Data

Source

pub fn approximate_op_count(&self) -> usize

Source

pub fn approximate_op_count_nested( &self, nested: impl Into<Option<bool>>, ) -> usize

Source

pub fn approximate_bytes_used(&self) -> usize

Source

pub fn to_shader<'a, 'b>( &self, tm: impl Into<Option<(TileMode, TileMode)>>, mode: FilterMode, local_matrix: impl Into<Option<&'a Matrix>>, tile_rect: impl Into<Option<&'b Rect>>, ) -> Shader

Source

pub fn dimensions(&self) -> ISize

Source

pub fn width(&self) -> i32

Source

pub fn height(&self) -> i32

Source

pub unsafe fn pixels(&self) -> *mut c_void

Source

pub fn row_bytes(&self) -> usize

Source

pub fn generation_id(&self) -> u32

Source

pub fn notify_pixels_changed(&mut self)

Source

pub fn is_immutable(&self) -> bool

Source

pub fn set_immutable(&mut self)

Source

pub fn notify_added_to_cache(&mut self)

Source

pub fn is_opaque(&self) -> bool

Returns true if the shader is guaranteed to produce only opaque colors, subject to the crate::Paint using the shader to apply an opaque alpha value. Subclasses should override this to allow some optimizations.

Source

pub fn image(&self) -> Option<(Image, Matrix, (TileMode, TileMode))>

Returns iff this shader is backed by a single Image. If not, returns None.

Source

pub fn is_a_image(&self) -> bool

Source

pub fn with_local_matrix(&self, matrix: &Matrix) -> Self

Return a shader that will apply the specified local_matrix to this shader. The specified matrix will be applied before any matrix associated with this shader.

Source

pub fn with_color_filter(&self, color_filter: impl Into<ColorFilter>) -> Self

Create a new shader that produces the same colors as invoking this shader and then applying the color filter.

Source

pub fn with_working_color_space( &self, color_space: impl Into<ColorSpace>, ) -> Self

Return a shader that will compute this shader in a specific color space. By default, all shaders operate in the destination (surface) color space. The results of a shader are still always converted to the destination - this API has no impact on simple shaders or images. Primarily, it impacts shaders that perform mathematical operations, like Blend shaders, or runtime shaders.

Source

pub fn width(&self) -> i32

Returns pixel count in each row; may be zero or greater.

Returns: number of pixel columns

Source

pub fn height(&self) -> i32

Returns pixel row count; may be zero or greater.

Returns: number of pixel rows

Source

pub fn image_info(&mut self) -> ImageInfo

Returns an ImageInfo describing the surface.

Source

pub fn generation_id(&mut self) -> u32

Returns unique value identifying the content of Surface. Returned value changes each time the content changes. Content is changed by drawing, or by calling Self::notify_content_will_change().

Returns: unique content identifier

example: https://fiddle.skia.org/c/@Surface_notifyContentWillChange

Source

pub fn notify_content_will_change( &mut self, mode: ContentChangeMode, ) -> &mut Self

Notifies that Surface contents will be changed by code outside of Skia. Subsequent calls to Self::generation_id() return a different value.

example: https://fiddle.skia.org/c/@Surface_notifyContentWillChange

Source

pub fn recording_context(&self) -> Option<RecordingContext>

Returns the recording context being used by the Surface.

Returns: the recording context, if available; None otherwise

Source

pub fn direct_context(&self) -> Option<DirectContext>

rust-skia helper, not in Skia

Source

pub fn get_backend_texture( &mut self, handle_access: BackendHandleAccess, ) -> Option<BackendTexture>

👎Deprecated since 0.64.0: use gpu::surfaces::get_backend_texture()

Retrieves the back-end texture. If Surface has no back-end texture, None is returned.

The returned gpu::BackendTexture should be discarded if the Surface is drawn to or deleted.

Returns: GPU texture reference; None on failure

Source

pub fn get_backend_render_target( &mut self, handle_access: BackendHandleAccess, ) -> Option<BackendRenderTarget>

👎Deprecated since 0.64.0: use gpu::surfaces::get_backend_render_target()

Retrieves the back-end render target. If Surface has no back-end render target, None is returned.

The returned gpu::BackendRenderTarget should be discarded if the Surface is drawn to or deleted.

Returns: GPU render target reference; None on failure

Source

pub fn replace_backend_texture( &mut self, backend_texture: &BackendTexture, origin: SurfaceOrigin, ) -> bool

If the surface was made via Self::from_backend_texture then it’s backing texture may be substituted with a different texture. The contents of the previous backing texture are copied into the new texture. Canvas state is preserved. The original sample count is used. The gpu::BackendFormat and dimensions of replacement texture must match that of the original.

  • backend_texture - the new backing texture for the surface
Source

pub fn replace_backend_texture_with_mode( &mut self, backend_texture: &BackendTexture, origin: SurfaceOrigin, mode: impl Into<Option<ContentChangeMode>>, ) -> bool

If the surface was made via Self::from_backend_texture() then it’s backing texture may be substituted with a different texture. The contents of the previous backing texture are copied into the new texture. Canvas state is preserved. The original sample count is used. The gpu::BackendFormat and dimensions of replacement texture must match that of the original.

  • backend_texture - the new backing texture for the surface
  • mode - Retain or discard current Content
Source

pub fn canvas(&mut self) -> &Canvas

Returns Canvas that draws into Surface. Subsequent calls return the same Canvas. Canvas returned is managed and owned by Surface, and is deleted when Surface is deleted.

Returns: drawing Canvas for Surface

example: https://fiddle.skia.org/c/@Surface_getCanvas

Source

pub fn new_surface(&mut self, image_info: &ImageInfo) -> Option<Self>

Returns a compatible Surface, or None. Returned Surface contains the same raster, GPU, or null properties as the original. Returned Surface does not share the same pixels.

Returns None if image_info width or height are zero, or if image_info is incompatible with Surface.

Returns: compatible Surface or None

example: https://fiddle.skia.org/c/@Surface_makeSurface

Source

pub fn new_surface_with_dimensions( &mut self, dim: impl Into<ISize>, ) -> Option<Self>

Calls Self::new_surface() with the same ImageInfo as this surface, but with the specified width and height.

Source

pub fn image_snapshot(&mut self) -> Image

Returns Image capturing Surface contents. Subsequent drawing to Surface contents are not captured. Image allocation is accounted for if Surface was created with gpu::Budgeted::Yes.

Returns: Image initialized with Surface contents

example: https://fiddle.skia.org/c/@Surface_makeImageSnapshot

Source

pub fn image_snapshot_with_bounds( &mut self, bounds: impl AsRef<IRect>, ) -> Option<Image>

Like the no-parameter version, this returns an image of the current surface contents. This variant takes a rectangle specifying the subset of the surface that is of interest. These bounds will be sanitized before being used.

  • If bounds extends beyond the surface, it will be trimmed to just the intersection of it and the surface.
  • If bounds does not intersect the surface, then this returns None.
  • If bounds == the surface, then this is the same as calling the no-parameter variant.

example: https://fiddle.skia.org/c/@Surface_makeImageSnapshot_2

Source

pub fn draw( &mut self, canvas: &Canvas, offset: impl Into<Point>, sampling: impl Into<SamplingOptions>, paint: Option<&Paint>, )

Draws Surface contents to canvas, with its top-left corner at (offset.x, offset.y).

If Paint paint is not None, apply crate::ColorFilter, alpha, crate::ImageFilter, and crate::BlendMode.

example: https://fiddle.skia.org/c/@Surface_draw

Source

pub fn peek_pixels(&mut self) -> Option<Pixmap<'_>>

Source

pub fn read_pixels_to_pixmap( &mut self, dst: &Pixmap<'_>, src: impl Into<IPoint>, ) -> bool

Copies crate::Rect of pixels to dst.

Source crate::Rect corners are (src.x, src.y) and Surface (width(), height()). Destination crate::Rect corners are (0, 0) and (dst.width(), dst.height()). Copies each readable pixel intersecting both rectangles, without scaling, converting to dst_color_type() and dst_alpha_type() if required.

Pixels are readable when Surface is raster, or backed by a Ganesh GPU backend. Graphite has deprecated this API in favor of the equivalent asynchronous API on skgpu::graphite::Context (with an optional explicit synchonization).

The destination pixel storage must be allocated by the caller.

Pixel values are converted only if crate::ColorType and crate::AlphaType do not match. Only pixels within both source and destination rectangles are copied. dst contents outside crate::Rect intersection are unchanged.

Pass negative values for src.x or src.y to offset pixels across or down destination.

Does not copy, and returns false if:

  • Source and destination rectangles do not intersect.
  • Pixmap pixels could not be allocated.
  • dst.row_bytes() is too small to contain one row of pixels.
  • dst - storage for pixels copied from Surface
  • src_x - offset into readable pixels on x-axis; may be negative
  • src_y - offset into readable pixels on y-axis; may be negative

Returns: true if pixels were copied

example: https://fiddle.skia.org/c/@Surface_readPixels

Source

pub fn read_pixels( &mut self, dst_info: &ImageInfo, dst_pixels: &mut [u8], dst_row_bytes: usize, src: impl Into<IPoint>, ) -> bool

Copies crate::Rect of pixels from Canvas into dst_pixels.

Source crate::Rect corners are (src.x, src.y) and Surface (width(), height()). Destination crate::Rect corners are (0, 0) and (dst_info.width(), dst_info.height()). Copies each readable pixel intersecting both rectangles, without scaling, converting to dst_info_color_type() and dst_info_alpha_type() if required.

Pixels are readable when Surface is raster, or backed by a Ganesh GPU backend. Graphite has deprecated this API in favor of the equivalent asynchronous API on skgpu::graphite::Context (with an optional explicit synchonization).

The destination pixel storage must be allocated by the caller.

Pixel values are converted only if crate::ColorType and crate::AlphaType do not match. Only pixels within both source and destination rectangles are copied. dst_pixels contents outside crate::Rect intersection are unchanged.

Pass negative values for src.x or src.y to offset pixels across or down destination.

Does not copy, and returns false if:

  • Source and destination rectangles do not intersect.
  • Surface pixels could not be converted to dst_info.color_type() or dst_info.alpha_type().
  • dst_row_bytes is too small to contain one row of pixels.
  • dst_info - width, height, crate::ColorType, and crate::AlphaType of dst_pixels
  • dst_pixels - storage for pixels; dst_info.height() times dst_row_bytes, or larger
  • dst_row_bytes - size of one destination row; dst_info.width() times pixel size, or larger
  • src.x - offset into readable pixels on x-axis; may be negative
  • src.y - offset into readable pixels on y-axis; may be negative

Returns: true if pixels were copied

Source

pub fn read_pixels_to_bitmap( &mut self, bitmap: &Bitmap, src: impl Into<IPoint>, ) -> bool

Copies crate::Rect of pixels from Surface into bitmap.

Source crate::Rect corners are (src.x, src.y) and Surface (width(), height()). Destination crate::Rect corners are (0, 0) and (bitmap.width(), bitmap.height()). Copies each readable pixel intersecting both rectangles, without scaling, converting to bitmap.color_type() and bitmap.alpha_type() if required.

Pixels are readable when Surface is raster, or backed by a Ganesh GPU backend. Graphite has deprecated this API in favor of the equivalent asynchronous API on skgpu::graphite::Context (with an optional explicit synchonization).

The destination pixel storage must be allocated by the caller.

Pixel values are converted only if crate::ColorType and crate::AlphaType do not match. Only pixels within both source and destination rectangles are copied. dst contents outside crate::Rect intersection are unchanged.

Pass negative values for src.x or src.y to offset pixels across or down destination.

Does not copy, and returns false if:

  • Source and destination rectangles do not intersect.
  • Surface pixels could not be converted to dst.color_type() or dst.alpha_type().
  • dst pixels could not be allocated.
  • dst.row_bytes() is too small to contain one row of pixels.
  • dst - storage for pixels copied from Surface
  • src.x - offset into readable pixels on x-axis; may be negative
  • src.y - offset into readable pixels on y-axis; may be negative

Returns: true if pixels were copied

example: https://fiddle.skia.org/c/@Surface_readPixels_3

Source

pub fn write_pixels_from_pixmap( &mut self, src: &Pixmap<'_>, dst: impl Into<IPoint>, )

Copies crate::Rect of pixels from the src Pixmap to the Surface.

Source crate::Rect corners are (0, 0) and (src.width(), src.height()). Destination crate::Rect corners are (dst.x, dst.y) and (dst.x + Surface width(), dst.y + Surface height()).

Copies each readable pixel intersecting both rectangles, without scaling, converting to Surface color_type() and Surface alpha_type() if required.

  • src - storage for pixels to copy to Surface
  • dst.x - x-axis position relative to Surface to begin copy; may be negative
  • dst.y - y-axis position relative to Surface to begin copy; may be negative

example: https://fiddle.skia.org/c/@Surface_writePixels

Source

pub fn write_pixels_from_bitmap( &mut self, bitmap: &Bitmap, dst: impl Into<IPoint>, )

Copies crate::Rect of pixels from the src Bitmap to the Surface.

Source crate::Rect corners are (0, 0) and (src.width(), src.height()). Destination crate::Rect corners are (dst.x, dst.y) and (dst.x+ Surface width(),dst.y + Surface height()).

Copies each readable pixel intersecting both rectangles, without scaling, converting to Surface color_type() and Surface alpha_type() if required.

  • src - storage for pixels to copy to Surface
  • dst.x - x-axis position relative to Surface to begin copy; may be negative
  • dst.y - y-axis position relative to Surface to begin copy; may be negative

example: https://fiddle.skia.org/c/@Surface_writePixels_2

Source

pub fn props(&self) -> &SurfaceProps

Returns SurfaceProps for surface.

Returns: LCD striping orientation and setting for device independent fonts

Source

pub fn resolve_msaa(&mut self)

👎Deprecated since 0.65.0: Use gpu::surfaces::resolve_msaa

If a surface is GPU texture backed, is being drawn with MSAA, and there is a resolve texture, this call will insert a resolve command into the stream of gpu commands. In order for the resolve to actually have an effect, the work still needs to be flushed and submitted to the GPU after recording the resolve command. If a resolve is not supported or the Surface has no dirty work to resolve, then this call is a no-op.

This call is most useful when the Surface is created by wrapping a single sampled gpu texture, but asking Skia to render with MSAA. If the client wants to use the wrapped texture outside of Skia, the only way to trigger a resolve is either to call this command or use Self::flush().

Source

pub fn bounds(&self) -> &Rect

Source

pub fn unique_id(&self) -> u32

Source

pub fn get_intercepts( &self, bounds: [scalar; 2], paint: Option<&Paint>, ) -> Vec<scalar>

Source

pub fn font_style(&self) -> FontStyle

Source

pub fn is_bold(&self) -> bool

Source

pub fn is_italic(&self) -> bool

Source

pub fn is_fixed_pitch(&self) -> bool

Source

pub fn variation_design_position(&self) -> Option<Vec<Coordinate>>

Source

pub fn variation_design_parameters(&self) -> Option<Vec<VariationAxis>>

Source

pub fn unique_id(&self) -> TypefaceId

Source

pub fn clone_with_arguments( &self, arguments: &FontArguments<'_, '_>, ) -> Option<Typeface>

Source

pub fn serialize_stream(&self, write: impl Write, behavior: SerializeBehavior)

Source

pub fn serialize(&self, behavior: SerializeBehavior) -> Data

Source

pub fn unichars_to_glyphs(&self, uni: &[Unichar], glyphs: &mut [GlyphId])

Source

pub fn str_to_glyphs( &self, str: impl AsRef<str>, glyphs: &mut [GlyphId], ) -> usize

Source

pub fn text_to_glyphs( &self, text: impl EncodedText, glyphs: &mut [GlyphId], ) -> usize

Source

pub fn unichar_to_glyph(&self, unichar: Unichar) -> GlyphId

Source

pub fn count_glyphs(&self) -> usize

Source

pub fn count_tables(&self) -> usize

Source

pub fn table_tags(&self) -> Option<Vec<FontTableTag>>

Source

pub fn get_table_size(&self, tag: FontTableTag) -> Option<usize>

Source

pub fn get_table_data(&self, tag: FontTableTag, data: &mut [u8]) -> usize

Source

pub fn copy_table_data(&self, tag: FontTableTag) -> Option<Data>

Source

pub fn units_per_em(&self) -> Option<i32>

Source

pub fn get_kerning_pair_adjustments( &self, glyphs: &[GlyphId], adjustments: &mut [i32], ) -> bool

Source

pub fn new_family_name_iterator(&self) -> impl Iterator<Item = LocalizedString>

Source

pub fn family_name(&self) -> String

Source

pub fn post_script_name(&self) -> Option<String>

Source

pub fn to_font_data(&self) -> Option<(Vec<u8>, usize)>

Source

pub fn bounds(&self) -> Rect

Source

pub const MAX_CUSTOM_ATTRIBUTES: usize = 8usize

Source

pub fn unique_id(&self) -> u32

Source

pub fn mode(&self) -> VertexMode

👎Deprecated since 0.29.0: will be removed without replacement
Source

pub fn bounds(&self) -> &Rect

Source

pub fn has_colors(&self) -> bool

👎Deprecated since 0.29.0: will be removed without replacement
Source

pub fn has_tex_coords(&self) -> bool

👎Deprecated since 0.29.0: will be removed without replacement
Source

pub fn has_bones(&self) -> bool

👎Deprecated since 0.29.0: returns false
Source

pub fn has_indices(&self) -> bool

👎Deprecated since 0.29.0: will be removed without replacement
Source

pub fn vertex_count(&self) -> usize

👎Deprecated since 0.29.0: will be removed without replacement
Source

pub fn index_count(&self) -> usize

👎Deprecated since 0.29.0: will be removed without replacement
Source

pub fn positions(&self) -> &[Point]

👎Deprecated since 0.29.0: will be removed without replacement
Source

pub fn tex_coords(&self) -> Option<&[Point]>

👎Deprecated since 0.29.0: will be removed without replacement
Source

pub fn colors(&self) -> Option<&[Color]>

👎Deprecated since 0.29.0: will be removed without replacement
Source

pub fn bone_indices(&self) -> Option<&[BoneIndices]>

👎Deprecated since 0.29.0: returns None
Source

pub fn bone_weights(&self) -> Option<&[BoneWeights]>

👎Deprecated since 0.29.0: returns None
Source

pub fn indices(&self) -> Option<&[u16]>

👎Deprecated since 0.29.0: will be removed without replacement
Source

pub fn is_volatile(&self) -> bool

👎Deprecated since 0.29.0: returns false
Source

pub fn apply_bones(&self, _bones: &[Bone]) -> !

👎Deprecated since 0.29.0: removed without replacement
Source

pub fn approximate_size(&self) -> usize

Source

pub fn encode(&self) -> !

👎Deprecated since 0.31.0: removed without replacement
Source

pub fn as_image_filter<'a>( &self, crop_rect: impl Into<Option<&'a Rect>>, ) -> Option<ImageFilter>

Source

pub fn make_shader<'a>( &self, uniforms: impl Into<Data>, children: &[ChildPtr], local_matrix: impl Into<Option<&'a Matrix>>, ) -> Option<Shader>

Source

pub fn make_color_filter<'a>( &self, inputs: impl Into<Data>, children: impl Into<Option<&'a [ChildPtr]>>, ) -> Option<ColorFilter>

Source

pub fn make_blender<'a>( &self, uniforms: impl Into<Data>, children: impl Into<Option<&'a [ChildPtr]>>, ) -> Option<Blender>

Source

pub fn source(&self) -> &str

Source

pub fn input_size(&self) -> usize

👎Deprecated since 0.35.0: Use uniform_size() instead
Source

pub fn uniform_size(&self) -> usize

Source

pub fn inputs(&self) -> &[Uniform]

👎Deprecated since 0.35.0: Use uniforms() instead
Source

pub fn uniforms(&self) -> &[Uniform]

Source

pub fn children(&self) -> &[Child]

Source

pub fn find_input(&self, name: impl AsRef<str>) -> Option<&Uniform>

👎Deprecated since 0.35.0: Use find_uniform()
Source

pub fn find_uniform(&self, name: impl AsRef<str>) -> Option<&Uniform>

Source

pub fn find_child(&self, name: impl AsRef<str>) -> Option<&Child>

Source

pub fn allow_shader(&self) -> bool

Source

pub fn allow_color_filter(&self) -> bool

Source

pub fn allow_blender(&self) -> bool

Source

pub fn encode<'a>( &self, context: impl Into<Option<&'a mut DirectContext>>, format: EncodedImageFormat, quality: impl Into<Option<u32>>, ) -> Option<Data>

Source

pub fn reset(&mut self, backend_state: Option<u32>) -> &mut Self

Source

pub fn reset_gl_texture_bindings(&mut self) -> &mut Self

Source

pub fn abandon(&mut self) -> &mut Self

Source

pub fn is_device_lost(&mut self) -> bool

Source

pub fn oomed(&mut self) -> bool

Source

pub fn release_resources_and_abandon(&mut self) -> &mut Self

Source

pub fn resource_cache_limit(&self) -> usize

Source

pub fn resource_cache_usage(&self) -> ResourceCacheUsage

Source

pub fn resource_cache_purgeable_bytes(&self) -> usize

Source

pub fn set_resource_cache_limits(&mut self, limits: ResourceCacheLimits)

Source

pub fn set_resource_cache_limit(&mut self, max_resource_bytes: usize)

Source

pub fn free_gpu_resources(&mut self) -> &mut Self

Source

pub fn perform_deferred_cleanup( &mut self, not_used: Duration, opts: impl Into<Option<PurgeResourceOptions>>, ) -> &mut Self

Source

pub fn purge_unlocked_resource_bytes( &mut self, bytes_to_purge: usize, prefer_scratch_resources: bool, ) -> &mut Self

Source

pub fn purge_unlocked_resources( &mut self, opts: PurgeResourceOptions, ) -> &mut Self

Source

pub fn flush_and_submit(&mut self) -> &mut Self

Source

pub fn flush_submit_and_sync_cpu(&mut self) -> &mut Self

Source

pub fn flush_with_info(&mut self, info: &FlushInfo) -> SemaphoresSubmitted

👎Deprecated since 0.37.0: Use flush()
Source

pub fn flush<'a>( &mut self, info: impl Into<Option<&'a FlushInfo>>, ) -> SemaphoresSubmitted

Source

pub fn flush_image_with_info( &mut self, image: &Image, info: &FlushInfo, ) -> SemaphoresSubmitted

Source

pub fn flush_image(&mut self, image: &Image)

Source

pub fn flush_and_submit_image(&mut self, image: &Image)

Source

pub fn flush_surface_with_access( &mut self, surface: &mut Surface, access: BackendSurfaceAccess, info: &FlushInfo, ) -> SemaphoresSubmitted

Source

pub fn flush_surface_with_texture_state( &mut self, surface: &mut Surface, info: &FlushInfo, new_state: Option<&MutableTextureState>, ) -> SemaphoresSubmitted

Source

pub fn flush_and_submit_surface( &mut self, surface: &mut Surface, sync_cpu: impl Into<Option<SyncCpu>>, )

Source

pub fn flush_surface(&mut self, surface: &mut Surface)

Source

pub fn submit(&mut self, submit_info: impl Into<SubmitInfo>) -> bool

Source

pub fn check_async_work_completion(&mut self)

Source

pub fn supports_distance_field_text(&self) -> bool

Source

pub fn store_vk_pipeline_cache_data(&mut self) -> &mut Self

Source

pub fn compressed_backend_format( &self, compression: TextureCompressionType, ) -> BackendFormat

Source

pub fn set_backend_texture_state( &mut self, backend_texture: &BackendTexture, state: &MutableTextureState, ) -> bool

Source

pub fn set_backend_texture_state_and_return_previous( &mut self, backend_texture: &BackendTexture, state: &MutableTextureState, ) -> Option<MutableTextureState>

Source

pub fn set_backend_render_target_state( &mut self, target: &BackendRenderTarget, state: &MutableTextureState, ) -> bool

Source

pub fn set_backend_render_target_state_and_return_previous( &mut self, target: &BackendRenderTarget, state: &MutableTextureState, ) -> Option<MutableTextureState>

Source

pub fn delete_backend_texture(&mut self, texture: &BackendTexture)

Source

pub fn precompile_shader(&mut self, key: &Data, data: &Data) -> bool

Source

pub fn id(&self) -> DirectContextId

Source

pub fn validate(&self) -> bool

Source

pub fn extensions(&self) -> &Extensions

Source

pub fn extensions_mut(&mut self) -> &mut Extensions

Source

pub fn has_extension(&self, extension: impl AsRef<str>) -> bool

Source

pub fn as_direct_context(&mut self) -> Option<DirectContext>

Source

pub fn backend(&self) -> BackendAPI

Source

pub fn default_backend_format( &self, ct: ColorType, renderable: Renderable, ) -> BackendFormat

Source

pub fn compressed_backend_format( &self, compression_type: TextureCompressionType, ) -> BackendFormat

Source

pub fn abandoned(&mut self) -> bool

Source

pub fn color_type_supported_as_surface(&self, color_type: ColorType) -> bool

Source

pub fn max_texture_size(&self) -> i32

Source

pub fn max_render_target_size(&self) -> i32

Source

pub fn color_type_supported_as_image(&self, color_type: ColorType) -> bool

Source

pub fn supports_protected_content(&self) -> bool

Source

pub fn max_surface_sample_count_for_color_type( &self, color_type: ColorType, ) -> usize

Source

pub fn copied(&self) -> Self

Source

pub fn vk_image_layout(&self) -> VkImageLayout

👎Deprecated since 0.72.0: use gpu::vk::mutable_texture_states::get_vk_image_layout()
Source

pub fn queue_family_index(&self) -> u32

👎Deprecated since 0.72.0: use gpu::vk::mutable_texture_states::get_vk_queue_family_index()
Source

pub fn backend(&self) -> BackendApi

Source

pub fn font_managers_count(&self) -> usize

Source

pub fn set_asset_font_manager( &mut self, font_manager: impl Into<Option<FontMgr>>, )

Source

pub fn set_dynamic_font_manager( &mut self, font_manager: impl Into<Option<FontMgr>>, )

Source

pub fn set_test_font_manager( &mut self, font_manager: impl Into<Option<FontMgr>>, )

Source

pub fn set_default_font_manager<'a>( &mut self, font_manager: impl Into<Option<FontMgr>>, default_family_name: impl Into<Option<&'a str>>, )

Source

pub fn set_default_font_manager_and_family_names( &mut self, font_manager: impl Into<Option<FontMgr>>, family_names: &[impl AsRef<str>], )

Source

pub fn fallback_manager(&self) -> Option<FontMgr>

Source

pub fn find_typefaces( &mut self, family_names: &[impl AsRef<str>], font_style: FontStyle, ) -> Vec<Typeface>

Source

pub fn find_typefaces_with_font_arguments<'fa>( &mut self, family_names: &[impl AsRef<str>], font_style: FontStyle, font_args: impl Into<Option<&'fa FontArguments>>, ) -> Vec<Typeface>

Source

pub fn default_fallback_char( &mut self, unicode: Unichar, font_style: FontStyle, locale: impl AsRef<str>, ) -> Option<Typeface>

Source

pub fn default_fallback(&mut self) -> Option<Typeface>

Source

pub fn default_emoji_fallback( &mut self, emoji_start: Unichar, font_style: FontStyle, locale: impl AsRef<str>, ) -> Option<Typeface>

Source

pub fn disable_font_fallback(&mut self)

Source

pub fn enable_font_fallback(&mut self)

Source

pub fn font_fallback_enabled(&self) -> bool

Source

pub fn paragraph_cache(&self) -> &ParagraphCache

Source

pub fn paragraph_cache_mut(&mut self) -> &mut ParagraphCache

Source

pub fn clear_caches(&mut self)

Source

pub fn family_name(&self) -> &str

Source

pub fn alias(&self) -> &str

Source

pub fn append_typeface(&mut self, typeface: Typeface) -> &mut Self

Source

pub fn register_typeface<'a>( &mut self, typeface: Typeface, alias: impl Into<Option<&'a str>>, ) -> usize

Source

pub fn is_multi_frame(&self) -> bool

Source

pub fn clip_path_units(&self) -> &BoundingBoxUnits

Source

pub fn set_clip_path_units(&mut self, value: BoundingBoxUnits)

Source

pub fn append_child(&mut self, node: impl Into<Node>)

Source

pub fn children(&self) -> &[Node]

Source

pub fn children_typed(&self) -> Vec<TypedNode>

Source

pub fn input2(&self) -> &Input

Source

pub fn set_input2(&mut self, value: Input)

Source

pub fn mode(&self) -> &BlendMode

Source

pub fn set_mode(&mut self, value: BlendMode)

Source

pub fn kind(&self) -> &ColorMatrixKind

Source

pub fn set_kind(&mut self, value: ColorMatrixKind)

Source

pub fn values(&self) -> &[scalar]

Source

pub fn table_values(&self) -> &[scalar]

Source

pub fn amplitude(&self) -> scalar

Source

pub fn set_amplitude(&mut self, value: scalar)

Source

pub fn exponent(&self) -> scalar

Source

pub fn set_exponent(&mut self, value: scalar)

Source

pub fn intercept(&self) -> scalar

Source

pub fn set_intercept(&mut self, value: scalar)

Source

pub fn offset(&self) -> scalar

Source

pub fn set_offset(&mut self, value: scalar)

Source

pub fn slope(&self) -> scalar

Source

pub fn set_slope(&mut self, value: scalar)

Source

pub fn kind(&self) -> &FuncKind

Source

pub fn set_kind(&mut self, value: FuncKind)

Source

pub fn input2(&self) -> &Input

Source

pub fn set_input2(&mut self, value: Input)

Source

pub fn k1(&self) -> scalar

Source

pub fn set_k1(&mut self, value: scalar)

Source

pub fn k2(&self) -> scalar

Source

pub fn set_k2(&mut self, value: scalar)

Source

pub fn k3(&self) -> scalar

Source

pub fn set_k3(&mut self, value: scalar)

Source

pub fn k4(&self) -> scalar

Source

pub fn set_k4(&mut self, value: scalar)

Source

pub fn operator(&self) -> &CompositeOperator

Source

pub fn set_operator(&mut self, value: CompositeOperator)

Source

pub fn input2(&self) -> &Input

Source

pub fn set_input2(&mut self, value: Input)

Source

pub fn x_channel_selector(&self) -> &ChannelSelector

Source

pub fn set_x_channel_selector(&mut self, value: ChannelSelector)

Source

pub fn y_channel_selector(&self) -> &ChannelSelector

Source

pub fn set_y_channel_selector(&mut self, value: ChannelSelector)

Source

pub fn scale(&self) -> &scalar

Source

pub fn set_scale(&mut self, value: scalar)

Source

pub fn std_deviation(&self) -> &StdDeviation

Source

pub fn set_std_deviation(&mut self, value: StdDeviation)

Source

pub fn href(&self) -> &Iri

Source

pub fn set_href(&mut self, value: Iri)

Source

pub fn preserve_aspect_ratio(&self) -> &PreserveAspectRatio

Source

pub fn set_preserve_aspect_ratio(&mut self, value: PreserveAspectRatio)

Source

pub fn azimuth(&self) -> scalar

Source

pub fn set_azimuth(&mut self, value: scalar)

Source

pub fn elevation(&self) -> scalar

Source

pub fn set_elevation(&mut self, value: scalar)

Source

pub fn x(&self) -> scalar

Source

pub fn set_x(&mut self, value: scalar)

Source

pub fn y(&self) -> scalar

Source

pub fn set_y(&mut self, value: scalar)

Source

pub fn z(&self) -> scalar

Source

pub fn set_z(&mut self, value: scalar)

Source

pub fn x(&self) -> scalar

Source

pub fn set_x(&mut self, value: scalar)

Source

pub fn y(&self) -> scalar

Source

pub fn set_y(&mut self, value: scalar)

Source

pub fn z(&self) -> scalar

Source

pub fn set_z(&mut self, value: scalar)

Source

pub fn points_at_x(&self) -> scalar

Source

pub fn set_points_at_x(&mut self, value: scalar)

Source

pub fn points_at_y(&self) -> scalar

Source

pub fn set_points_at_y(&mut self, value: scalar)

Source

pub fn points_at_z(&self) -> scalar

Source

pub fn set_points_at_z(&mut self, value: scalar)

Source

pub fn specular_exponent(&self) -> scalar

Source

pub fn set_specular_exponent(&mut self, value: scalar)

Source

pub fn limiting_cone_angle(&self) -> Option<scalar>

Source

pub fn set_limiting_cone_angle(&mut self, value: scalar)

Source

pub fn surface_scale(&self) -> scalar

Source

pub fn set_surface_scale(&mut self, value: scalar)

Source

pub fn kernel_unit_length(&self) -> Option<KernelUnitLength>

Source

pub fn set_kernel_unit_length(&mut self, value: KernelUnitLength)

Source

pub fn specular_constant(&self) -> scalar

Source

pub fn set_specular_constant(&mut self, value: scalar)

Source

pub fn specular_exponent(&self) -> scalar

Source

pub fn set_specular_exponent(&mut self, value: scalar)

Source

pub fn diffuse_constant(&self) -> scalar

Source

pub fn set_diffuse_constant(&mut self, value: scalar)

Source

pub fn input(&self) -> &Input

Source

pub fn set_input(&mut self, value: Input)

Source

pub fn operator(&self) -> &Operator

Source

pub fn set_operator(&mut self, value: Operator)

Source

pub fn radius(&self) -> &Radius

Source

pub fn set_radius(&mut self, value: Radius)

Source

pub fn dx(&self) -> scalar

Source

pub fn set_dx(&mut self, value: scalar)

Source

pub fn dy(&self) -> scalar

Source

pub fn set_dy(&mut self, value: scalar)

Source

pub fn base_frequency(&self) -> &TurbulenceBaseFrequency

Source

pub fn set_base_frequency(&mut self, value: TurbulenceBaseFrequency)

Source

pub fn num_octaves(&self) -> i32

Source

pub fn set_num_octaves(&mut self, value: i32)

Source

pub fn seed(&self) -> scalar

Source

pub fn set_seed(&mut self, value: scalar)

Source

pub fn turbulence_type(&self) -> &TurbulenceType

Source

pub fn set_turbulence_type(&mut self, value: TurbulenceType)

Source

pub fn input(&self) -> &Input

Source

pub fn set_input(&mut self, value: Input)

Source

pub fn result(&self) -> &Handle<SkString>

Source

pub fn set_result(&mut self, value: Handle<SkString>)

Source

pub fn x(&self) -> Option<&Length>

Source

pub fn set_x(&mut self, value: Length)

Source

pub fn y(&self) -> Option<&Length>

Source

pub fn set_y(&mut self, value: Length)

Source

pub fn width(&self) -> Option<&Length>

Source

pub fn set_width(&mut self, value: Length)

Source

pub fn height(&self) -> Option<&Length>

Source

pub fn set_height(&mut self, value: Length)

Source

pub fn x(&self) -> &Length

Source

pub fn set_x(&mut self, value: Length)

Source

pub fn y(&self) -> &Length

Source

pub fn set_y(&mut self, value: Length)

Source

pub fn width(&self) -> &Length

Source

pub fn set_width(&mut self, value: Length)

Source

pub fn height(&self) -> &Length

Source

pub fn set_height(&mut self, value: Length)

Source

pub fn filter_units(&self) -> &BoundingBoxUnits

Source

pub fn set_filter_units(&mut self, value: BoundingBoxUnits)

Source

pub fn primitive_units(&self) -> &BoundingBoxUnits

Source

pub fn set_primitive_units(&mut self, value: BoundingBoxUnits)

Source

pub fn x1(&self) -> &Length

Source

pub fn set_x1(&mut self, value: Length)

Source

pub fn y1(&self) -> &Length

Source

pub fn set_y1(&mut self, value: Length)

Source

pub fn x2(&self) -> &Length

Source

pub fn set_x2(&mut self, value: Length)

Source

pub fn y2(&self) -> &Length

Source

pub fn set_y2(&mut self, value: Length)

Source

pub fn cx(&self) -> &Length

Source

pub fn set_cx(&mut self, value: Length)

Source

pub fn cy(&self) -> &Length

Source

pub fn set_cy(&mut self, value: Length)

Source

pub fn r(&self) -> &Length

Source

pub fn set_r(&mut self, value: Length)

Source

pub fn fx(&self) -> Option<&Length>

Source

pub fn set_fx(&mut self, value: Length)

Source

pub fn fy(&self) -> Option<&Length>

Source

pub fn set_fy(&mut self, value: Length)

Source

pub fn href(&self) -> &Iri

Source

pub fn set_href(&mut self, value: Iri)

Source

pub fn gradient_transform(&self) -> &Matrix

Source

pub fn set_gradient_transform(&mut self, value: Matrix)

Source

pub fn spread_method(&self) -> &SpreadMethod

Source

pub fn set_spread_method(&mut self, value: SpreadMethod)

Source

pub fn gradient_units(&self) -> &BoundingBoxUnits

Source

pub fn set_gradient_units(&mut self, value: BoundingBoxUnits)

Source

pub fn x(&self) -> &Length

Source

pub fn set_x(&mut self, value: Length)

Source

pub fn y(&self) -> &Length

Source

pub fn set_y(&mut self, value: Length)

Source

pub fn width(&self) -> &Length

Source

pub fn set_width(&mut self, value: Length)

Source

pub fn height(&self) -> &Length

Source

pub fn set_height(&mut self, value: Length)

Source

pub fn href(&self) -> &Iri

Source

pub fn set_href(&mut self, value: Iri)

Source

pub fn preserve_aspect_ratio(&self) -> &PreserveAspectRatio

Source

pub fn set_preserve_aspect_ratio(&mut self, value: PreserveAspectRatio)

Source

pub fn x(&self) -> &Length

Source

pub fn set_x(&mut self, value: Length)

Source

pub fn y(&self) -> &Length

Source

pub fn set_y(&mut self, value: Length)

Source

pub fn width(&self) -> &Length

Source

pub fn set_width(&mut self, value: Length)

Source

pub fn height(&self) -> &Length

Source

pub fn set_height(&mut self, value: Length)

Source

pub fn mask_units(&self) -> &BoundingBoxUnits

Source

pub fn set_mask_units(&mut self, value: BoundingBoxUnits)

Source

pub fn mask_content_units(&self) -> &BoundingBoxUnits

Source

pub fn set_mask_content_units(&mut self, value: BoundingBoxUnits)

Source

pub fn tag(&self) -> NodeTag

Source

pub fn clip_rule(&self) -> Option<&FillRule>

Source

pub fn set_clip_rule(&mut self, value: FillRule)

Source

pub fn color_interpolation(&self) -> Option<&ColorSpace>

Source

pub fn set_color_interpolation(&mut self, value: ColorSpace)

Source

pub fn color_interpolation_filters(&self) -> Option<&ColorSpace>

Source

pub fn set_color_interpolation_filters(&mut self, value: ColorSpace)

Source

pub fn color(&self) -> Option<&Color>

Source

pub fn set_color(&mut self, value: Color)

Source

pub fn fill_rule(&self) -> Option<&FillRule>

Source

pub fn set_fill_rule(&mut self, value: FillRule)

Source

pub fn fill(&self) -> Option<&Paint>

Source

pub fn set_fill(&mut self, value: Paint)

Source

pub fn fill_opacity(&self) -> Option<scalar>

Source

pub fn set_fill_opacity(&mut self, value: scalar)

Source

pub fn font_family(&self) -> Option<&FontFamily>

Source

pub fn set_font_family(&mut self, value: FontFamily)

Source

pub fn font_size(&self) -> Option<&FontSize>

Source

pub fn set_font_size(&mut self, value: FontSize)

Source

pub fn font_style(&self) -> Option<&FontStyle>

Source

pub fn set_font_style(&mut self, value: FontStyle)

Source

pub fn font_weight(&self) -> Option<&FontWeight>

Source

pub fn set_font_weight(&mut self, value: FontWeight)

Source

pub fn stroke(&self) -> Option<&Paint>

Source

pub fn set_stroke(&mut self, value: Paint)

Source

pub fn stroke_line_cap(&self) -> Option<&LineCap>

Source

pub fn set_stroke_line_cap(&mut self, value: LineCap)

Source

pub fn stroke_line_join(&self) -> Option<&LineJoin>

Source

pub fn set_stroke_line_join(&mut self, value: LineJoin)

Source

pub fn stroke_miter_limit(&self) -> Option<scalar>

Source

pub fn set_stroke_miter_limit(&mut self, value: scalar)

Source

pub fn stroke_opacity(&self) -> Option<scalar>

Source

pub fn set_stroke_opacity(&mut self, value: scalar)

Source

pub fn stroke_width(&self) -> Option<&Length>

Source

pub fn set_stroke_width(&mut self, value: Length)

Source

pub fn text_anchor(&self) -> Option<&TextAnchor>

Source

pub fn set_text_anchor(&mut self, value: TextAnchor)

Source

pub fn visibility(&self) -> Option<&Visibility>

Source

pub fn set_visibility(&mut self, value: Visibility)

Source

pub fn clip_path(&self) -> Option<&IriFunc>

Source

pub fn set_clip_path(&mut self, value: IriFunc)

Source

pub fn display(&self) -> Option<&Display>

Source

pub fn set_display(&mut self, value: Display)

Source

pub fn mask(&self) -> Option<&IriFunc>

Source

pub fn set_mask(&mut self, value: IriFunc)

Source

pub fn filter(&self) -> Option<&IriFunc>

Source

pub fn set_filter(&mut self, value: IriFunc)

Source

pub fn opacity(&self) -> Option<scalar>

Source

pub fn set_opacity(&mut self, value: scalar)

Source

pub fn stop_color(&self) -> Option<&Fill>

Source

pub fn set_stop_color(&mut self, value: Fill)

Source

pub fn stop_opacity(&self) -> Option<scalar>

Source

pub fn set_stop_opacity(&mut self, value: scalar)

Source

pub fn flood_color(&self) -> Option<&Fill>

Source

pub fn set_flood_color(&mut self, value: Fill)

Source

pub fn flood_opacity(&self) -> Option<scalar>

Source

pub fn set_flood_opacity(&mut self, value: scalar)

Source

pub fn lighting_color(&self) -> Option<&Fill>

Source

pub fn set_lighting_color(&mut self, value: Fill)

Source

pub fn as_base(&self) -> &RCHandle<T::Base>

Source

pub fn as_base_mut(&mut self) -> &mut RCHandle<T::Base>

Source

pub fn href(&self) -> &Iri

Source

pub fn set_href(&mut self, value: Iri)

Source

pub fn x(&self) -> Option<&Length>

Source

pub fn set_x(&mut self, value: Length)

Source

pub fn y(&self) -> Option<&Length>

Source

pub fn set_y(&mut self, value: Length)

Source

pub fn width(&self) -> Option<&Length>

Source

pub fn set_width(&mut self, value: Length)

Source

pub fn height(&self) -> Option<&Length>

Source

pub fn set_height(&mut self, value: Length)

Source

pub fn pattern_transform(&self) -> Option<&Matrix>

Source

pub fn set_pattern_transform(&mut self, value: Matrix)

Source

pub fn cx(&self) -> &Length

Source

pub fn set_cx(&mut self, value: Length)

Source

pub fn cy(&self) -> &Length

Source

pub fn set_cy(&mut self, value: Length)

Source

pub fn r(&self) -> &Length

Source

pub fn set_r(&mut self, value: Length)

Source

pub fn cx(&self) -> &Length

Source

pub fn set_cx(&mut self, value: Length)

Source

pub fn cy(&self) -> &Length

Source

pub fn set_cy(&mut self, value: Length)

Source

pub fn rx(&self) -> Option<&Length>

Source

pub fn set_rx(&mut self, value: Length)

Source

pub fn ry(&self) -> Option<&Length>

Source

pub fn set_ry(&mut self, value: Length)

Source

pub fn x1(&self) -> &Length

Source

pub fn set_x1(&mut self, value: Length)

Source

pub fn y1(&self) -> &Length

Source

pub fn set_y1(&mut self, value: Length)

Source

pub fn x2(&self) -> &Length

Source

pub fn set_x2(&mut self, value: Length)

Source

pub fn y2(&self) -> &Length

Source

pub fn set_y2(&mut self, value: Length)

Source

pub fn path(&self) -> &Path

Source

pub fn set_path(&mut self, value: Path)

Source

pub fn points(&self) -> &[Point]

Source

pub fn x(&self) -> &Length

Source

pub fn set_x(&mut self, value: Length)

Source

pub fn y(&self) -> &Length

Source

pub fn set_y(&mut self, value: Length)

Source

pub fn width(&self) -> &Length

Source

pub fn set_width(&mut self, value: Length)

Source

pub fn height(&self) -> &Length

Source

pub fn set_height(&mut self, value: Length)

Source

pub fn rx(&self) -> Option<&Length>

Source

pub fn set_rx(&mut self, value: Length)

Source

pub fn ry(&self) -> Option<&Length>

Source

pub fn set_ry(&mut self, value: Length)

Source

pub fn offset(&self) -> &Length

Source

pub fn set_offset(&mut self, value: Length)

Source

pub fn x(&self) -> &Length

Source

pub fn set_x(&mut self, value: Length)

Source

pub fn y(&self) -> &Length

Source

pub fn set_y(&mut self, value: Length)

Source

pub fn width(&self) -> &Length

Source

pub fn set_width(&mut self, value: Length)

Source

pub fn height(&self) -> &Length

Source

pub fn set_height(&mut self, value: Length)

Source

pub fn preserve_aspect_ratio(&self) -> &PreserveAspectRatio

Source

pub fn set_preserve_aspect_ratio(&mut self, value: PreserveAspectRatio)

Source

pub fn view_box(&self) -> Option<&Rect>

Source

pub fn set_view_box(&mut self, value: Rect)

Source

pub fn intrinsic_size(&self) -> Size

Source

pub fn x(&self) -> &[Length]

Source

pub fn y(&self) -> &[Length]

Source

pub fn dx(&self) -> &[Length]

Source

pub fn dy(&self) -> &[Length]

Source

pub fn rotate(&self) -> &[scalar]

Source

pub fn xml_space(&self) -> &XmlSpace

Source

pub fn set_xml_space(&mut self, value: XmlSpace)

Source

pub fn text(&self) -> &str

Source

pub fn set_text(&mut self, value: &str)

Source

pub fn href(&self) -> &Iri

Source

pub fn set_href(&mut self, value: Iri)

Source

pub fn start_offset(&self) -> &Length

Source

pub fn set_start_offset(&mut self, value: Length)

Source

pub fn set_transform(&mut self, transform: &Matrix)

Source

pub fn transform(&self) -> &Matrix

Source

pub fn x(&self) -> &Length

Source

pub fn set_x(&mut self, value: Length)

Source

pub fn y(&self) -> &Length

Source

pub fn set_y(&mut self, value: Length)

Source

pub fn href(&self) -> &Iri

Source

pub fn set_href(&mut self, value: Iri)

Source

pub fn root(&self) -> Svg

Source

pub fn render(&self, canvas: &Canvas)

Source

pub fn set_container_size(&mut self, size: impl Into<Size>)

Source

pub fn append(&mut self, font_mgr: impl Into<FontMgr>)

Trait Implementations§

Source§

impl Debug for TypefaceFontProvider

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TypefaceFontProvider

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl DerefMut for TypefaceFontProvider

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl Deref for TypefaceFontProvider

Source§

type Target = RCHandle<SkFontMgr>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.