pub struct PDRectangle {
pub lower_left_x: f64,
pub lower_left_y: f64,
pub upper_right_x: f64,
pub upper_right_y: f64,
}Expand description
A rectangle in default user space units (1/72 inch). Lower-left (x, y) to Upper-right (x, y).
Fields§
§lower_left_x: f64§lower_left_y: f64§upper_right_x: f64§upper_right_y: f64Implementations§
Source§impl PDRectangle
impl PDRectangle
pub const A4: PDRectangle
pub const A3: PDRectangle
pub const A5: PDRectangle
pub const LETTER: PDRectangle
pub const LEGAL: PDRectangle
pub const TABLOID: PDRectangle
pub const fn new(llx: f64, lly: f64, urx: f64, ury: f64) -> Self
pub fn width(&self) -> f64
pub fn height(&self) -> f64
pub fn center(&self) -> (f64, f64)
pub fn to_cos_array(&self) -> COSArray
pub fn from_cos_array(arr: &COSArray) -> Option<Self>
Trait Implementations§
Source§impl Clone for PDRectangle
impl Clone for PDRectangle
Source§fn clone(&self) -> PDRectangle
fn clone(&self) -> PDRectangle
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 PDRectangle
Source§impl Debug for PDRectangle
impl Debug for PDRectangle
Source§impl From<PDRectangle> for COSObject
impl From<PDRectangle> for COSObject
Source§fn from(rect: PDRectangle) -> Self
fn from(rect: PDRectangle) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PDRectangle
impl PartialEq for PDRectangle
impl StructuralPartialEq for PDRectangle
Auto Trait Implementations§
impl Freeze for PDRectangle
impl RefUnwindSafe for PDRectangle
impl Send for PDRectangle
impl Sync for PDRectangle
impl Unpin for PDRectangle
impl UnsafeUnpin for PDRectangle
impl UnwindSafe for PDRectangle
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