pub struct Attributes {
pub records: Vec<Record>,
}Expand description
A parsed attribute list.
Fields§
§records: Vec<Record>The records, in stored order.
Implementations§
Source§impl Attributes
impl Attributes
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
The blob, records in the same order (unchanged records give the same bytes).
Sourcepub fn set(&mut self, id: u32, data: Vec<u8>)
pub fn set(&mut self, id: u32, data: Vec<u8>)
Replaces the first record with this id, or appends one.
Sourcepub fn bbox(&self) -> Option<[i32; 4]>
pub fn bbox(&self) -> Option<[i32; 4]>
Text block bounding box in layer pixels (record 42: x0, y0, x1, y1).
Sourcepub fn block_size(&self) -> Option<[i32; 2]>
pub fn block_size(&self) -> Option<[i32; 2]>
Text block width and height in pixels (record 63).
Sourcepub fn quad(&self) -> Option<[i32; 8]>
pub fn quad(&self) -> Option<[i32; 8]>
Four corners in 1/100 px relative to the anchor (record 64).
Sourcepub fn balloon(&self) -> Option<u32>
pub fn balloon(&self) -> Option<u32>
The 1-based index of the balloon object the block sits in (record 45).
Sourcepub fn render_offscreen(&self) -> Option<u32>
pub fn render_offscreen(&self) -> Option<u32>
Id of the offscreen CSP rendered the text into (record 50; 0 = render again).
Sourcepub fn clear_render_offscreen(&mut self)
pub fn clear_render_offscreen(&mut self)
Make CSP render the text again on opening (needed after changing it).
Trait Implementations§
Source§impl Clone for Attributes
impl Clone for Attributes
Source§impl Debug for Attributes
impl Debug for Attributes
Source§impl Default for Attributes
impl Default for Attributes
impl Eq for Attributes
Source§impl PartialEq for Attributes
impl PartialEq for Attributes
impl StructuralPartialEq for Attributes
Auto Trait Implementations§
impl Freeze for Attributes
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnsafeUnpin for Attributes
impl UnwindSafe for Attributes
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.