pub struct CanvasGridFrame {Show 18 fields
pub dst_x: i32,
pub dst_y: i32,
pub dst_w: u32,
pub dst_h: u32,
pub origin: [f32; 2],
pub minor_spacing: [f32; 2],
pub major_every: u32,
pub super_major_every: u32,
pub thickness: [f32; 4],
pub background_top_rgba: u32,
pub background_bottom_rgba: u32,
pub minor_rgba: u32,
pub major_rgba: u32,
pub super_major_rgba: u32,
pub axis_rgba: u32,
pub fade_center: [f32; 2],
pub fade_radii: [f32; 2],
pub flags: u32,
}Expand description
Parameters for one procedural canvas-grid frame.
Fields map 1:1 onto the 100-byte fragment push block consumed by
src/slang/ui/canvas_grid.frag.slang; colors are packed 0xRRGGBBAA.
Fields§
§dst_x: i32Destination rect inside the render target, in pixels.
dst_y: i32§dst_w: u32§dst_h: u32§origin: [f32; 2]Grid-line origin in target pixels (lines pass through this point).
minor_spacing: [f32; 2]Minor-tier spacing in pixels on each axis. Must be finite and >= 1.
major_every: u32Lines every major_every minors promote to the major tier (>= 1).
super_major_every: u32Lines every super_major_every majors promote further (>= 1).
thickness: [f32; 4]Coverage thickness in pixels: minor, major, super-major, axis.
background_top_rgba: u32§background_bottom_rgba: u32§minor_rgba: u32§major_rgba: u32§super_major_rgba: u32§axis_rgba: u32§fade_center: [f32; 2]Radial-fade center in target pixels.
fade_radii: [f32; 2]Inner (full opacity) and outer (zero opacity) fade radii.
flags: u32Layer enable bits, matching the fragment shader: bit 0 gradient background, bit 1 axes, bit 2 grid tiers, bit 3 radial fade, bit 4 background dither.