Expand description
Pure math/data for drawing & units in Cranpose
This crate contains geometry primitives, color definitions, brushes, and unit types that are used throughout the Cranpose framework.
Re-exports§
pub use alpha_mask::*;pub use liquid_glass::*;pub use render_effect::*;
Modules§
- alpha_
mask - Alpha-mask helpers for graphics-layer effects.
- framework_
shaders - WGSL sources for the framework’s rendering pipelines.
- liquid_
glass - LiquidGlass effect: a refractive glass material rendered via RuntimeShader.
- prelude
- render_
effect - Render effects that can be applied to graphics layers.
Structs§
- Color
- Corner
Radii - Dp
- Density-independent pixels
- DpOffset
- Density-independent offset for shadows.
- Draw
Scope Default - Edge
Insets - Padding values for each edge of a rectangle.
- Font
Weight - Font weight (100-900)
- Graphics
Layer - Image
Bitmap - Immutable RGBA image data used by UI primitives and render backends.
- Point
- Px
- Raw pixels
- Rect
- Rounded
Corner Shape - Shadow
- Static shadow configuration.
- Shadow
Scope - Pixel-space shadow scope used by block-based APIs.
- Size
- Sp
- Scale-independent pixels (for text)
- Text
Style - Text style (data only, no rendering)
- Transform
Origin - Vector
Path - A parsed SVG path: subpaths flattened to polylines, ready to fill.
Enums§
- Blend
Mode - Blend mode used for draw primitives.
- Brush
- Color
Filter - Simple image color filter model.
- Compositing
Strategy - Controls how a graphics layer is composited into its parent target.
- Draw
Primitive - Font
Style - Font style (normal, italic, oblique)
- Gradient
Blur Direction - Axis and direction used to interpolate the blur radius.
- Image
Bitmap Error - Errors returned while constructing an
ImageBitmap. - Image
Sampling - Texture sampling mode for image primitives.
- Layer
Shape - Path
Fill Rule - Fill rule for
VectorPathrasterization. - Shadow
Primitive - Describes a shadow to be rendered. Each renderer chooses how to blur.
- SvgPath
Error - Errors produced while parsing SVG path data.
Constants§
- GRADIENT_
BLUR_ WGSL - WGSL implementation of a per-fragment Gaussian-style blur kernel.
Traits§
Functions§
- gradient_
blur_ effect - Build a spatially varying blur effect.