Crate skia_rs_core

Crate skia_rs_core 

Source
Expand description

§skia-rs-core

Core types for the skia-rs graphics library.

This crate provides fundamental types used throughout skia-rs:

  • Geometry: Points, sizes, rectangles, matrices
  • Color: Color types, color spaces, alpha handling
  • Pixels: Image info, pixel storage, format conversion
  • Region: Complex clip regions composed of rectangles

§Skia API Compatibility

Types in this crate mirror Skia’s core types:

Re-exports§

pub use color::AlphaType;
pub use color::Color;
pub use color::Color4f;
pub use color::ColorFilterFlags;
pub use color::ColorGamut;
pub use color::ColorSpace;
pub use color::ColorType;
pub use color::IccColorSpace;
pub use color::IccPcs;
pub use color::IccProfile;
pub use color::IccProfileClass;
pub use color::TransferFunction;
pub use color::color_to_linear;
pub use color::color4f_linear_to_srgb;
pub use color::color4f_srgb_to_linear;
pub use color::contrast_ratio;
pub use color::hsl_to_rgb;
pub use color::hsv_to_rgb;
pub use color::lab_to_rgb;
pub use color::linear_to_color;
pub use color::linear_to_srgb;
pub use color::luminance;
pub use color::mix_colors;
pub use color::premultiply_color;
pub use color::rgb_to_hsl;
pub use color::rgb_to_hsv;
pub use color::rgb_to_lab;
pub use color::rgb_to_xyz;
pub use color::srgb_to_linear;
pub use color::unpremultiply_color;
pub use color::xyz_to_rgb;
pub use geometry::Corner;
pub use geometry::IPoint;
pub use geometry::IRect;
pub use geometry::ISize;
pub use geometry::Matrix;
pub use geometry::Point;
pub use geometry::Point3;
pub use geometry::RRect;
pub use geometry::Rect;
pub use geometry::Size;
pub use matrix44::Matrix44;
pub use pixel::Bitmap;
pub use pixel::ImageInfo;
pub use pixel::PixelError;
pub use pixel::PixelGeometry;
pub use pixel::Pixmap;
pub use pixel::SurfaceProps;
pub use pixel::SurfacePropsFlags;
pub use pixel::convert_pixels;
pub use pixel::premultiply_in_place;
pub use pixel::swizzle_rb_in_place;
pub use pixel::unpremultiply_in_place;
pub use region::Region;
pub use region::RegionOp;

Modules§

color
Color types and color space handling.
geometry
Geometric primitives: points, sizes, rectangles, and matrices.
matrix44
4x4 transformation matrix for 3D transformations.
pixel
Pixel formats and image storage.
prelude
Prelude module for convenient imports.
region
Region operations for complex clipping.

Traits§

AsScalar
A trait for types that can be converted to/from Skia scalar values.

Type Aliases§

Scalar
Scalar type used for all floating-point geometry.