Struct oxygengine_composite_renderer::math::Rect
source · [−]Fields
x: Scalary: Scalarw: Scalarh: ScalarImplementations
sourceimpl Rect
impl Rect
pub fn raw(x: Scalar, y: Scalar, w: Scalar, h: Scalar) -> Self
pub fn new(position: Vec2, size: Vec2) -> Self
pub fn with_size(size: Vec2) -> Self
pub fn bounding(points: &[Vec2]) -> Option<Self>
pub fn align(&self, factor: Vec2) -> Self
pub fn expand(&self, thickness: Scalar) -> Self
pub fn include(&self, point: Vec2) -> Self
pub fn validate(&mut self)
pub fn center(&self) -> Vec2
pub fn size(&self) -> Vec2
pub fn contains_point(&self, point: Vec2) -> bool
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Rect
impl<'de> Deserialize<'de> for Rect
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Rect
impl StructuralPartialEq for Rect
Auto Trait Implementations
impl RefUnwindSafe for Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnwindSafe for Rect
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more