Struct BBox
pub struct BBox {
pub llx: f32,
pub lly: f32,
pub urx: f32,
pub ury: f32,
}Expand description
A glyph or font bounding box, in 1/1000 em.
f32 rather than i16 so AFMs that emit fractional values for
FontBBox or character B records (rare but legal) round-trip
without precision loss.
§Examples
use adobe_font_metrics::BBox;
let bbox = BBox {
llx: -20.0,
lly: -200.0,
urx: 1000.0,
ury: 900.0,
};
assert_eq!(bbox.urx, 1000.0);Fields§
§llx: f32Lower-left x coordinate.
lly: f32Lower-left y coordinate.
urx: f32Upper-right x coordinate.
ury: f32Upper-right y coordinate.
Trait Implementations§
impl Copy for BBox
impl StructuralPartialEq for BBox
Auto Trait Implementations§
impl Freeze for BBox
impl RefUnwindSafe for BBox
impl Send for BBox
impl Sync for BBox
impl Unpin for BBox
impl UnsafeUnpin for BBox
impl UnwindSafe for BBox
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