#[repr(C)]
pub struct QPoint { /* private fields */ }
Expand description
The QPoint struct defines a point in the plane using integer precision.
Returns true if both the x and y coordinates are set to 0, otherwise returns false.
Returns the sum of the absolute values of x() and y(),
traditionally known as the “Manhattan length” of the vector from the origin to the point.
Sets the x coordinate of this point to the given x coordinate.
Sets the y coordinate of this point to the given y coordinate.
Returns a point with x and y coordinates exchanged
Returns the x coordinate of this point.
Returns the y coordinate of this point.
Returns the dot product of p1 and p2.
Constructs a point with the given coordinates (x, y).
The resulting type after applying the +
operator.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Constructs a null point, i.e. with coordinates (0, 0)
Formats the value using the given formatter.
Read more
The resulting type after applying the /
operator.
A type-level representation of the type’s C++ namespace and type name.
Read more
Constructs a copy of the given point.
Constructs a vector with x and y coordinates from a 2D point.
Constructs a vector with x and y coordinates from a 2D point, and a z coordinate of 0.
Constructs a vector with x and y coordinates from a 2D point, and z and w coordinates of 0.
Rounds the coordinates of this point to the nearest integer,
and returns a QPoint object with the rounded coordinates.
Returns the QPointF form of this 2D vector.
Returns the QPoint form of this 3D vector. The z coordinate is dropped.
Returns the QPoint form of this 4D vector. The z and w coordinates are dropped.
The x and y coordinates are rounded to nearest integers.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
This method tests for self
and other
values to be equal, and is used
by ==
.
This method tests for !=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
The resulting type after applying the -
operator.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String
.
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.