Struct pathfinder_geometry::rect::RectF

source ·
pub struct RectF(pub F32x4);

Tuple Fields§

§0: F32x4

Implementations§

source§

impl RectF

source

pub fn new(origin: Vector2F, size: Vector2F) -> RectF

source

pub fn from_points(origin: Vector2F, lower_right: Vector2F) -> RectF

source

pub fn origin(self) -> Vector2F

source

pub fn size(self) -> Vector2F

source

pub fn origin_x(self) -> f32

source

pub fn origin_y(self) -> f32

source

pub fn width(self) -> f32

source

pub fn height(self) -> f32

source

pub fn upper_right(self) -> Vector2F

source

pub fn lower_left(self) -> Vector2F

source

pub fn lower_right(self) -> Vector2F

source

pub fn set_origin_x(&mut self, x: f32)

source

pub fn set_origin_y(&mut self, y: f32)

source

pub fn contains_point(self, point: Vector2F) -> bool

source

pub fn contains_rect(self, other: RectF) -> bool

source

pub fn is_empty(self) -> bool

source

pub fn union_point(self, point: Vector2F) -> RectF

source

pub fn union_rect(self, other: RectF) -> RectF

source

pub fn intersects(self, other: RectF) -> bool

source

pub fn intersection(self, other: RectF) -> Option<RectF>

source

pub fn min_x(self) -> f32

source

pub fn min_y(self) -> f32

source

pub fn max_x(self) -> f32

source

pub fn max_y(self) -> f32

source

pub fn center(self) -> Vector2F

source

pub fn round(self) -> RectF

Rounds all points to the nearest integer.

source

pub fn round_out(self) -> RectF

source

pub fn dilate<A>(self, amount: A) -> RectF
where A: IntoVector2F,

source

pub fn contract<A>(self, amount: A) -> RectF
where A: IntoVector2F,

source

pub fn to_i32(&self) -> RectI

Trait Implementations§

source§

impl Add<Vector2F> for RectF

§

type Output = RectF

The resulting type after applying the + operator.
source§

fn add(self, other: Vector2F) -> RectF

Performs the + operation. Read more
source§

impl Add<f32> for RectF

§

type Output = RectF

The resulting type after applying the + operator.
source§

fn add(self, other: f32) -> RectF

Performs the + operation. Read more
source§

impl Clone for RectF

source§

fn clone(&self) -> RectF

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RectF

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for RectF

source§

fn default() -> RectF

Returns the “default value” for a type. Read more
source§

impl Mul<RectF> for Perspective

§

type Output = RectF

The resulting type after applying the * operator.
source§

fn mul(self, rect: RectF) -> RectF

Performs the * operation. Read more
source§

impl Mul<RectF> for Transform2F

§

type Output = RectF

The resulting type after applying the * operator.
source§

fn mul(self, rect: RectF) -> RectF

Performs the * operation. Read more
source§

impl Mul<Vector2F> for RectF

§

type Output = RectF

The resulting type after applying the * operator.
source§

fn mul(self, factors: Vector2F) -> RectF

Performs the * operation. Read more
source§

impl Mul<f32> for RectF

§

type Output = RectF

The resulting type after applying the * operator.
source§

fn mul(self, factor: f32) -> RectF

Performs the * operation. Read more
source§

impl PartialEq for RectF

source§

fn eq(&self, other: &RectF) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Sub<Vector2F> for RectF

§

type Output = RectF

The resulting type after applying the - operator.
source§

fn sub(self, other: Vector2F) -> RectF

Performs the - operation. Read more
source§

impl Sub<f32> for RectF

§

type Output = RectF

The resulting type after applying the - operator.
source§

fn sub(self, other: f32) -> RectF

Performs the - operation. Read more
source§

impl Copy for RectF

source§

impl StructuralPartialEq for RectF

Auto Trait Implementations§

§

impl Freeze for RectF

§

impl RefUnwindSafe for RectF

§

impl Send for RectF

§

impl Sync for RectF

§

impl Unpin for RectF

§

impl UnwindSafe for RectF

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.