Struct rute::auto::polygon_f::PolygonF

source ·
pub struct PolygonF<'a> { /* private fields */ }
Expand description

Notice these docs are heavy WIP and not very relevent yet

A QPolygonF is a QVector. The easiest way to add points to a QPolygonF is to use its streaming operator, as illustrated below:

In addition to the functions provided by QVector, QPolygonF provides the boundingRect() and translate() functions for geometry operations. Use the QMatrix::map() function for more general transformations of QPolygonFs.

QPolygonF also provides the isClosed() function to determine whether a polygon’s start and end points are the same, and the toPolygon() function returning an integer precision copy of this polygon.

The QPolygonF class is implicitly shared

See also: QVector QPolygon QLineF

Licence

The documentation is an adoption of the original Qt Documentation and provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.

Implementations

Swaps polygon other with this polygon. This operation is very fast and never fails.

Creates and returns a QPolygon by converting each QPointF to a QPoint.

See also: QPointF::toPoint()

Returns true if the polygon is closed; otherwise returns false.

A polygon is said to be closed if its start point and end point are equal.

See also: QVector::first() QVector::last()

Returns the bounding rectangle of the polygon, or QRectF(0,0,0,0) if the polygon is empty.

See also: QVector::isEmpty()

Returns true if the given point is inside the polygon according to the specified fillRule; otherwise returns false.

Returns a polygon which is the union of this polygon and r.

Set operations on polygons will treat the polygons as areas. Non-closed polygons will be treated as implicitly closed.

See also: intersected() subtracted()

Returns a polygon which is the intersection of this polygon and r.

Set operations on polygons will treat the polygons as areas. Non-closed polygons will be treated as implicitly closed.

See also: intersects()

Returns true if the current polygon intersects at any point the given polygon p. Also returns true if the current polygon contains or is contained by any part of p.

Set operations on polygons will treat the polygons as areas. Non-closed polygons will be treated as implicitly closed.

See also: intersected()

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

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

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
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.