[][src]Struct skia_safe::Point

#[repr(C)]
pub struct Point {
    pub x: scalar,
    pub y: scalar,
}

Fields

x: scalary: scalar

Methods

impl Point[src]

pub const fn new(x: scalar, y: scalar) -> Self[src]

pub fn is_zero(self) -> bool[src]

pub fn set(&mut self, x: scalar, y: scalar)[src]

pub fn iset(&mut self, p: impl Into<IPoint>)[src]

pub fn set_abs(&mut self, p: impl Into<Point>)[src]

pub fn offset_points(points: &mut [Point], offset: impl Into<Vector>)[src]

pub fn offset(&mut self, d: impl Into<Vector>)[src]

pub fn length(self) -> scalar[src]

pub fn distance_to_origin(self) -> scalar[src]

pub fn normalize(&mut self) -> bool[src]

pub fn set_normalize(&mut self, x: scalar, y: scalar) -> bool[src]

pub fn set_length(&mut self, length: scalar) -> bool[src]

pub fn set_length_xy(&mut self, x: scalar, y: scalar, length: scalar) -> bool[src]

pub fn with_length(self, length: scalar) -> Option<Self>[src]

Deprecated since 0.12.0:

use set_length()

#[must_use] pub fn scaled(self, scale: scalar) -> Self[src]

pub fn scale(&mut self, scale: scalar)[src]

pub fn negate(&mut self)[src]

pub fn is_finite(self) -> bool[src]

pub fn equals(self, x: scalar, y: scalar) -> bool[src]

pub fn length_xy(x: scalar, y: scalar) -> scalar[src]

pub fn normalize_vector(v: &mut Vector) -> scalar[src]

pub fn distance(a: Self, b: Self) -> scalar[src]

pub fn dot_product(a: Self, b: Self) -> scalar[src]

pub fn cross_product(a: Self, b: Self) -> scalar[src]

pub fn cross(self, vec: Vector) -> scalar[src]

pub fn dot(self, vec: Vector) -> scalar[src]

Trait Implementations

impl Contains<Point> for Rect[src]

impl Default for Point[src]

impl Clone for Point[src]

impl PartialEq<Point> for Point[src]

impl From<(f32, f32)> for Point[src]

impl From<IPoint> for Point[src]

impl From<(i32, i32)> for Point[src]

impl Copy for Point[src]

impl Add<Point> for Point[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<Size> for Point[src]

type Output = Self

The resulting type after applying the + operator.

impl Sub<Point> for Point[src]

type Output = Point

The resulting type after applying the - operator.

impl Sub<Size> for Point[src]

type Output = Self

The resulting type after applying the - operator.

impl Mul<f32> for Point[src]

type Output = Self

The resulting type after applying the * operator.

impl Neg for Point[src]

type Output = Point

The resulting type after applying the - operator.

impl AddAssign<Point> for Point[src]

impl AddAssign<Size> for Point[src]

impl SubAssign<Point> for Point[src]

impl SubAssign<Size> for Point[src]

impl MulAssign<f32> for Point[src]

impl Debug for Point[src]

Auto Trait Implementations

impl Send for Point

impl Unpin for Point

impl Sync for Point

impl UnwindSafe for Point

impl RefUnwindSafe for Point

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]