Struct graphene::Quad[][src]

pub struct Quad(_);
Expand description

A 4 vertex quadrilateral, as represented by four Point.

The contents of a Quad are private and should never be accessed directly.

Implementations

Computes the bounding rectangle of self and places it into r.

Returns

r

return location for a Rect

Checks if the given Quad contains the given Point.

p

a Point

Returns

true if the point is inside the Quad

Retrieves the point of a Quad at the given index.

index_

the index of the point to retrieve

Returns

a Point

Initializes a Quad with the given points.

p1

the first point of the quadrilateral

p2

the second point of the quadrilateral

p3

the third point of the quadrilateral

p4

the fourth point of the quadrilateral

Returns

the initialized Quad

Initializes a Quad using the four corners of the given Rect.

r

a Rect

Returns

the initialized Quad

Initializes a Quad using an array of points.

points

an array of 4 Point

Returns

the initialized Quad

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

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

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

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

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Returns the type identifier of Self.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.