pub struct PageTransform { /* private fields */ }Expand description
Affine transform between pixel space of one rendered bitmap and page space of the page it was rendered from.
Obtained from RenderedPage::transform or
PdfPage::transform_for. Plain data: freely Clone/Send/Sync,
and independent of any PDFium resource.
Implementations§
Source§impl PageTransform
impl PageTransform
Sourcepub fn pixel_width(&self) -> u32
pub fn pixel_width(&self) -> u32
Width in pixels of the bitmap this transform describes.
Sourcepub fn pixel_height(&self) -> u32
pub fn pixel_height(&self) -> u32
Height in pixels of the bitmap this transform describes.
Sourcepub fn pixel_to_page(&self, p: PixelPoint) -> PagePoint
pub fn pixel_to_page(&self, p: PixelPoint) -> PagePoint
Maps a pixel-space point to page space.
Sourcepub fn page_to_pixel(&self, p: PagePoint) -> PixelPoint
pub fn page_to_pixel(&self, p: PagePoint) -> PixelPoint
Maps a page-space point to pixel space.
Sourcepub fn pixel_rect_to_page(&self, r: PixelRect) -> PageRect
pub fn pixel_rect_to_page(&self, r: PixelRect) -> PageRect
Maps a pixel-space rectangle to a normalized page-space rectangle.
Sourcepub fn page_rect_to_pixel(&self, r: PageRect) -> PixelRect
pub fn page_rect_to_pixel(&self, r: PageRect) -> PixelRect
Maps a page-space rectangle to a pixel-space rectangle (top-left + size, with non-negative size).
Trait Implementations§
Source§impl Clone for PageTransform
impl Clone for PageTransform
Source§fn clone(&self) -> PageTransform
fn clone(&self) -> PageTransform
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 moreimpl Copy for PageTransform
Source§impl Debug for PageTransform
impl Debug for PageTransform
Source§impl PartialEq for PageTransform
impl PartialEq for PageTransform
impl StructuralPartialEq for PageTransform
Auto Trait Implementations§
impl Freeze for PageTransform
impl RefUnwindSafe for PageTransform
impl Send for PageTransform
impl Sync for PageTransform
impl Unpin for PageTransform
impl UnsafeUnpin for PageTransform
impl UnwindSafe for PageTransform
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