Struct pdfium_render::quad_points::PdfQuadPoints
source · pub struct PdfQuadPoints {
pub x1: PdfPoints,
pub y1: PdfPoints,
pub x2: PdfPoints,
pub y2: PdfPoints,
pub x3: PdfPoints,
pub y3: PdfPoints,
pub x4: PdfPoints,
pub y4: PdfPoints,
}Expand description
A set of four coordinates expressed in PdfPoints that outline the bounds of a four-sided quadrilateral. The coordinates specify the quadrilateral’s four vertices in counter-clockwise order:
(x4, y4) (x3, y3)
._____________________.
| |
| |
!_____________________!
(x1, y1) (x2, y2)More information on quad points can be found in Section 8.30 of the PDF Reference Manual, version 1.7, on page 634.
Fields§
§x1: PdfPoints§y1: PdfPoints§x2: PdfPoints§y2: PdfPoints§x3: PdfPoints§y3: PdfPoints§x4: PdfPoints§y4: PdfPointsImplementations§
source§impl PdfQuadPoints
impl PdfQuadPoints
sourcepub fn new(
x1: PdfPoints,
y1: PdfPoints,
x2: PdfPoints,
y2: PdfPoints,
x3: PdfPoints,
y3: PdfPoints,
x4: PdfPoints,
y4: PdfPoints,
) -> Self
pub fn new( x1: PdfPoints, y1: PdfPoints, x2: PdfPoints, y2: PdfPoints, x3: PdfPoints, y3: PdfPoints, x4: PdfPoints, y4: PdfPoints, ) -> Self
Creates a new PdfQuadPoints from the given PdfPoints coordinate pairs.
The coordinate space of a PdfPage has its origin (0,0) at the bottom left of the page,
with x values increasing as coordinates move horizontally to the right and
y values increasing as coordinates move vertically up.
sourcepub fn new_from_values(
x1: f32,
y1: f32,
x2: f32,
y2: f32,
x3: f32,
y3: f32,
x4: f32,
y4: f32,
) -> Self
pub fn new_from_values( x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, x4: f32, y4: f32, ) -> Self
Creates a new PdfQuadPoints from the given raw points values.
The coordinate space of a PdfPage has its origin (0,0) at the bottom left of the page,
with x values increasing as coordinates move horizontally to the right and
y values increasing as coordinates move vertically up.
sourcepub fn from_rect(rect: PdfRect) -> Self
pub fn from_rect(rect: PdfRect) -> Self
Creates a new PdfQuadPoints from the given PdfRect.
Trait Implementations§
source§impl Clone for PdfQuadPoints
impl Clone for PdfQuadPoints
source§fn clone(&self) -> PdfQuadPoints
fn clone(&self) -> PdfQuadPoints
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for PdfQuadPoints
impl Debug for PdfQuadPoints
source§impl Display for PdfQuadPoints
impl Display for PdfQuadPoints
impl Copy for PdfQuadPoints
Auto Trait Implementations§
impl Freeze for PdfQuadPoints
impl RefUnwindSafe for PdfQuadPoints
impl Send for PdfQuadPoints
impl Sync for PdfQuadPoints
impl Unpin for PdfQuadPoints
impl UnwindSafe for PdfQuadPoints
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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>
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>
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