pub enum CoordinateSystem {
PdfStandard,
ScreenSpace,
Custom(TransformMatrix),
}Expand description
Coordinate system types supported for rendering
Variants§
PdfStandard
PDF standard: origin (0,0) at bottom-left, Y increases upward This is the native PDF coordinate system per ISO 32000-1:2008
ScreenSpace
Screen-like: origin (0,0) at top-left, Y increases downward Familiar to web developers and screen graphics programmers
Custom(TransformMatrix)
Custom transformation matrix for advanced use cases
Implementations§
Source§impl CoordinateSystem
impl CoordinateSystem
Sourcepub fn to_pdf_standard_matrix(&self, page_height: f64) -> TransformMatrix
pub fn to_pdf_standard_matrix(&self, page_height: f64) -> TransformMatrix
Get transformation matrix to convert from this system to PDF standard
Sourcepub fn to_pdf_standard(&self, point: Point, page_height: f64) -> Point
pub fn to_pdf_standard(&self, point: Point, page_height: f64) -> Point
Convert a point from this coordinate system to PDF standard
Sourcepub fn y_to_pdf_standard(&self, y: f64, page_height: f64) -> f64
pub fn y_to_pdf_standard(&self, y: f64, page_height: f64) -> f64
Convert a Y coordinate specifically (common operation)
Sourcepub fn grows_upward(&self) -> bool
pub fn grows_upward(&self) -> bool
Check if this coordinate system grows upward (like PDF standard)
Trait Implementations§
Source§impl Clone for CoordinateSystem
impl Clone for CoordinateSystem
Source§fn clone(&self) -> CoordinateSystem
fn clone(&self) -> CoordinateSystem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CoordinateSystem
impl Debug for CoordinateSystem
Source§impl Default for CoordinateSystem
impl Default for CoordinateSystem
Source§impl PartialEq for CoordinateSystem
impl PartialEq for CoordinateSystem
impl Copy for CoordinateSystem
impl StructuralPartialEq for CoordinateSystem
Auto Trait Implementations§
impl Freeze for CoordinateSystem
impl RefUnwindSafe for CoordinateSystem
impl Send for CoordinateSystem
impl Sync for CoordinateSystem
impl Unpin for CoordinateSystem
impl UnwindSafe for CoordinateSystem
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().