pub struct ImageQuad {
pub screen: [f32; 4],
pub name: String,
pub char_offset: usize,
}Expand description
An inline image placeholder.
text-typeset computes the position and size but does NOT load or rasterize
the image. The adapter retrieves the image data (e.g., from
TextDocument::resource(name)) and draws it as a separate texture.
Fields§
§screen: [f32; 4]Screen position and size: [x, y, width, height] in pixels.
name: StringImage resource name (matches FragmentContent::Image::name from text-document).
char_offset: usizeDocument-absolute character offset of this image’s single U+FFFC.
The name alone cannot say which placement this is — a document may
hold one picture in three places — so anything that has to answer “is
THIS image inside the selection” needs the offset. Same value, derived
the same way, as the offset hit_test reports for a click on it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImageQuad
impl RefUnwindSafe for ImageQuad
impl Send for ImageQuad
impl Sync for ImageQuad
impl Unpin for ImageQuad
impl UnsafeUnpin for ImageQuad
impl UnwindSafe for ImageQuad
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