#[repr(C)]pub struct PathUniforms {Show 13 fields
pub viewport_size: [f32; 2],
pub opacity: f32,
pub _pad0: f32,
pub transform: [[f32; 4]; 3],
pub clip_bounds: [f32; 4],
pub clip_radius: [f32; 4],
pub clip_type: u32,
pub use_gradient_texture: u32,
pub use_image_texture: u32,
pub use_glass_effect: u32,
pub image_uv_bounds: [f32; 4],
pub glass_params: [f32; 4],
pub glass_tint: [f32; 4],
}Expand description
Uniform buffer for path rendering Layout matches shader struct exactly:
- viewport_size:
vec2<f32>(8 bytes) - opacity: f32 (4 bytes)
- _pad0: f32 (4 bytes)
- transform_row0:
vec4<f32>(16 bytes) - transform_row1:
vec4<f32>(16 bytes) - transform_row2:
vec4<f32>(16 bytes) - clip_bounds:
vec4<f32>(16 bytes) - (x, y, width, height) or (cx, cy, rx, ry) - clip_radius:
vec4<f32>(16 bytes) - corner radii (tl, tr, br, bl) or (rx, ry, 0, 0) - clip_type:
u32(4 bytes) - 0=none, 1=rect, 2=circle, 3=ellipse - use_gradient_texture:
u32(4 bytes) - 0=use vertex colors, 1=sample gradient texture - use_image_texture:
u32(4 bytes) - 0=no image, 1=sample image texture - use_glass_effect:
u32(4 bytes) - 0=no glass, 1=glass effect on path - image_uv_bounds:
vec4<f32>(16 bytes) - (u_min, v_min, u_max, v_max) for image UV mapping - glass_params:
vec4<f32>(16 bytes) - (blur_radius, saturation, tint_strength, opacity) - glass_tint:
vec4<f32>(16 bytes) - glass tint color RGBA Total: 160 bytes
Fields§
§viewport_size: [f32; 2]§opacity: f32§_pad0: f32§transform: [[f32; 4]; 3]3x3 transform matrix stored as 3 vec4s (xyz used, w is padding)
clip_bounds: [f32; 4]Clip bounds: (x, y, width, height) for rects, (cx, cy, rx, ry) for circles/ellipses
clip_radius: [f32; 4]Clip corner radii for rounded rects: (top-left, top-right, bottom-right, bottom-left) For circles/ellipses: (rx, ry, 0, 0)
clip_type: u32Clip type: 0=none, 1=rect, 2=circle, 3=ellipse
use_gradient_texture: u32Use gradient texture: 0=use vertex colors (2-stop fast path), 1=sample gradient texture
use_image_texture: u32Use image texture: 0=no image, 1=sample image texture for brush
use_glass_effect: u32Use glass effect: 0=no glass, 1=glass effect on path (requires mask texture)
image_uv_bounds: [f32; 4]Image UV bounds for mapping: (u_min, v_min, u_max, v_max)
glass_params: [f32; 4]Glass parameters: (blur_radius, saturation, tint_strength, opacity)
glass_tint: [f32; 4]Glass tint color (RGBA)
Trait Implementations§
Source§impl Clone for PathUniforms
impl Clone for PathUniforms
Source§fn clone(&self) -> PathUniforms
fn clone(&self) -> PathUniforms
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PathUniforms
impl Debug for PathUniforms
Source§impl Default for PathUniforms
impl Default for PathUniforms
impl Copy for PathUniforms
impl Pod for PathUniforms
Auto Trait Implementations§
impl Freeze for PathUniforms
impl RefUnwindSafe for PathUniforms
impl Send for PathUniforms
impl Sync for PathUniforms
impl Unpin for PathUniforms
impl UnsafeUnpin for PathUniforms
impl UnwindSafe for PathUniforms
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.