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 more