pub struct BBoxDevice { /* private fields */ }Expand description
A bounding box tracker that records the extent of all drawing operations.
Implementations§
Source§impl BBoxDevice
impl BBoxDevice
pub fn new(page_transform: Matrix) -> Self
Sourcepub fn bbox(&self) -> Option<Rect>
pub fn bbox(&self) -> Option<Rect>
Get the computed bounding box, or None if no content was drawn.
Sourcepub fn extend_rect(&mut self, x: f64, y: f64, w: f64, h: f64)
pub fn extend_rect(&mut self, x: f64, y: f64, w: f64, h: f64)
Extend the bounding box with a rectangle in PDF user space.
Sourcepub fn process_ops(&mut self, ops: &[ContentOp])
pub fn process_ops(&mut self, ops: &[ContentOp])
Process content stream operations to compute bounding box.
Auto Trait Implementations§
impl Freeze for BBoxDevice
impl RefUnwindSafe for BBoxDevice
impl Send for BBoxDevice
impl Sync for BBoxDevice
impl Unpin for BBoxDevice
impl UnsafeUnpin for BBoxDevice
impl UnwindSafe for BBoxDevice
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more