Struct pdfium_render::page::PdfRect
source · pub struct PdfRect {
pub bottom: PdfPoints,
pub left: PdfPoints,
pub top: PdfPoints,
pub right: PdfPoints,
}Expand description
Fields§
§bottom: PdfPoints§left: PdfPoints§top: PdfPoints§right: PdfPointsImplementations§
source§impl PdfRect
impl PdfRect
sourcepub const fn new(
bottom: PdfPoints,
left: PdfPoints,
top: PdfPoints,
right: PdfPoints
) -> Self
pub const fn new( bottom: PdfPoints, left: PdfPoints, top: PdfPoints, right: PdfPoints ) -> Self
sourcepub const fn zero() -> Self
pub const fn zero() -> Self
Creates a new PdfRect object with all values set to 0.0.
Consider using the compile-time constant value PdfRect::ZERO rather than calling this function directly.
sourcepub fn contains(&self, x: PdfPoints, y: PdfPoints) -> bool
pub fn contains(&self, x: PdfPoints, y: PdfPoints) -> bool
Returns true if the given point lies inside this PdfRect.
sourcepub fn contains_x(&self, x: PdfPoints) -> bool
pub fn contains_x(&self, x: PdfPoints) -> bool
Returns true if the given horizontal coordinate lies inside this PdfRect.
sourcepub fn contains_y(&self, y: PdfPoints) -> bool
pub fn contains_y(&self, y: PdfPoints) -> bool
Returns true if the given vertical coordinate lies inside this PdfRect.
sourcepub fn is_inside(&self, rect: &PdfRect) -> bool
pub fn is_inside(&self, rect: &PdfRect) -> bool
Returns true if the bounds of this PdfRect lie entirely within the given rectangle.
sourcepub fn does_overlap(&self, rect: &PdfRect) -> bool
pub fn does_overlap(&self, rect: &PdfRect) -> bool
Returns true if the bounds of this PdfRect lie at least partially within
the given rectangle.