pub struct BoundingBox {
pub x: f64,
pub y: f64,
pub width: f64,
pub height: f64,
}Expand description
바운딩 박스 (위치 + 크기, 픽셀 단위)
Fields§
§x: f64X 좌표 (페이지 내 절대 위치, px)
y: f64Y 좌표 (페이지 내 절대 위치, px)
width: f64폭 (px)
height: f64높이 (px)
Implementations§
Source§impl BoundingBox
impl BoundingBox
pub fn new(x: f64, y: f64, width: f64, height: f64) -> Self
Sourcepub fn intersects(&self, other: &BoundingBox) -> bool
pub fn intersects(&self, other: &BoundingBox) -> bool
다른 박스와 겹치는지 확인
Sourcepub fn contains(&self, other: &BoundingBox) -> bool
pub fn contains(&self, other: &BoundingBox) -> bool
다른 박스를 포함하는지 확인
Sourcepub fn from_hwpunit_rect(rect: &Rect, dpi: f64) -> Self
pub fn from_hwpunit_rect(rect: &Rect, dpi: f64) -> Self
HWPUNIT Rect를 픽셀 BoundingBox로 변환
Trait Implementations§
Source§impl Clone for BoundingBox
impl Clone for BoundingBox
impl Copy for BoundingBox
Source§impl Debug for BoundingBox
impl Debug for BoundingBox
Source§impl Default for BoundingBox
impl Default for BoundingBox
Auto Trait Implementations§
impl Forget for BoundingBox
impl Freeze for BoundingBox
impl Move for BoundingBox
impl RefUnwindSafe for BoundingBox
impl Send for BoundingBox
impl Sync for BoundingBox
impl Unpin for BoundingBox
impl UnsafeUnpin for BoundingBox
impl UnwindSafe for BoundingBox
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.