#[repr(C)]pub struct KittyGraphicsPlacementRenderInfo {
pub size: usize,
pub pixel_width: u32,
pub pixel_height: u32,
pub grid_cols: u32,
pub grid_rows: u32,
pub viewport_col: i32,
pub viewport_row: i32,
pub viewport_visible: bool,
pub source_x: u32,
pub source_y: u32,
pub source_width: u32,
pub source_height: u32,
}Expand description
Combined rendering geometry for a placement in a single sized struct.
Combines the results of ghostty_kitty_graphics_placement_pixel_size(), ghostty_kitty_graphics_placement_grid_size(), ghostty_kitty_graphics_placement_viewport_pos(), and ghostty_kitty_graphics_placement_source_rect() into one call. This is an optimization over calling those four functions individually, particularly useful in environments with high per-call overhead such as FFI or Cgo.
This struct uses the sized-struct ABI pattern. Initialize with GHOSTTY_INIT_SIZED(GhosttyKittyGraphicsPlacementRenderInfo) before calling ghostty_kitty_graphics_placement_render_info().
Fields§
§size: usizeSize of this struct in bytes. Must be set to sizeof(GhosttyKittyGraphicsPlacementRenderInfo).
pixel_width: u32Rendered width in pixels.
pixel_height: u32Rendered height in pixels.
grid_cols: u32Number of grid columns the placement occupies.
grid_rows: u32Number of grid rows the placement occupies.
viewport_col: i32Viewport-relative column (may be negative for partially visible placements).
viewport_row: i32Viewport-relative row (may be negative for partially visible placements).
viewport_visible: boolFalse when the placement is fully off-screen or virtual.
source_x: u32Resolved source rectangle x origin in pixels.
source_y: u32Resolved source rectangle y origin in pixels.
source_width: u32Resolved source rectangle width in pixels.
source_height: u32Resolved source rectangle height in pixels.
Trait Implementations§
Source§impl Clone for KittyGraphicsPlacementRenderInfo
impl Clone for KittyGraphicsPlacementRenderInfo
Source§fn clone(&self) -> KittyGraphicsPlacementRenderInfo
fn clone(&self) -> KittyGraphicsPlacementRenderInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more