Struct dummy_rustwlc::types::Point [] [src]

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

Represents the location of a view.

Fields

x coordinate

y coordinate

Methods

impl Point
[src]

The point defined as (0, 0).

Create a new point from the given x and y coordinates.

Creates a new point with an x and y which are the smallest of the two points.

Examples:

let a = Point::new(0i32, 12i32);
let b = Point::new(12i32, 0i32);

assert_eq!(Point::from_min_coords(a, b), Point::new(0, 0));

Creates a new point with an x and y which are the largest of the two points.

Examples:

let a = Point::new(0i32, 12i32);
let b = Point::new(12i32, 0i32);

assert_eq!(Point::from_max_coords(a, b), Point::new(12i32, 12i32));

Trait Implementations

impl Debug for Point
[src]

Formats the value using the given formatter.

impl Eq for Point
[src]

impl PartialEq for Point
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Copy for Point
[src]

impl Clone for Point
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for Point
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for Point
[src]

Formats the value using the given formatter. Read more