pub struct GraphicOverlay {
pub image_id: u64,
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
pub z_index: i32,
pub source_rect: [f32; 4],
}Expand description
An overlay image placement. Used by the renderer to draw images on top of (or behind) terminal content.
Fields§
§image_id: u64Image texture key (kitty_image_key or atlas_image_key).
x: f32Screen position (physical pixels).
y: f32§width: f32Display dimensions (physical pixels).
height: f32§z_index: i32Z-index for layering.
source_rect: [f32; 4]Source rectangle in normalised texture coordinates [u0, v0, u1, v1].
[0.0, 0.0, 1.0, 1.0] (the default) draws the whole image; other
values draw a slice — used by the kitty Unicode-placeholder path
where each placeholder cell shows one slice of the image.
Implementations§
Source§impl GraphicOverlay
impl GraphicOverlay
Sourcepub const FULL_SOURCE_RECT: [f32; 4]
pub const FULL_SOURCE_RECT: [f32; 4]
Default source rect — full image.
Trait Implementations§
Source§impl Clone for GraphicOverlay
impl Clone for GraphicOverlay
Source§fn clone(&self) -> GraphicOverlay
fn clone(&self) -> GraphicOverlay
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GraphicOverlay
impl RefUnwindSafe for GraphicOverlay
impl Send for GraphicOverlay
impl Sync for GraphicOverlay
impl Unpin for GraphicOverlay
impl UnsafeUnpin for GraphicOverlay
impl UnwindSafe for GraphicOverlay
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
Mutably borrows from an owned value. Read more