Represents a parallelogram that is defined by 3 points. More...
#include <juce_Parallelogram.h>
Public Member Functions | |
Parallelogram ()=default | |
Creates a parallelogram with zero size at the origin. More... | |
Parallelogram (const Parallelogram &)=default | |
Creates a copy of another parallelogram. More... | |
Parallelogram (Point< ValueType > topLeftPosition, Point< ValueType > topRightPosition, Point< ValueType > bottomLeftPosition) noexcept | |
Creates a parallelogram based on 3 points. More... | |
Parallelogram (Rectangle< ValueType > rectangle) noexcept | |
Creates a parallelogram from a rectangle. More... | |
~Parallelogram ()=default | |
Destructor. More... | |
Point< ValueType > | getBottomLeft () const noexcept |
Returns the parallelogram's bottom-left position as a Point. More... | |
Point< ValueType > | getBottomRight () const noexcept |
Returns the parallelogram's bottom-right position as a Point. More... | |
Rectangle< ValueType > | getBoundingBox () const noexcept |
Returns the smallest rectangle that encloses this parallelogram. More... | |
ValueType | getHeight () const noexcept |
Returns the height of the parallelogram (i.e. More... | |
Point< ValueType > | getRelativePoint (Point< ValueType > relativePosition) const noexcept |
Returns a point within this parallelogram, specified as proportional coordinates. More... | |
Point< ValueType > | getTopLeft () const noexcept |
Returns the parallelogram's top-left position as a Point. More... | |
Point< ValueType > | getTopRight () const noexcept |
Returns the parallelogram's top-right position as a Point. More... | |
ValueType | getWidth () const noexcept |
Returns the width of the parallelogram (i.e. More... | |
bool | isEmpty () const noexcept |
Returns true if the parallelogram has a width or height of more than zero. More... | |
bool | isFinite () const noexcept |
Returns true if the parallelogram's coordinates are all finite numbers, i.e. More... | |
bool | operator!= (const Parallelogram &other) const noexcept |
Returns true if the two parallelograms are not identical. More... | |
template<typename PointOrScalarType > | |
Parallelogram | operator* (PointOrScalarType scaleFactor) const noexcept |
Returns a parallelogram that has been scaled by the given amount, centred around the origin. More... | |
template<typename PointOrScalarType > | |
Parallelogram | operator*= (PointOrScalarType scaleFactor) noexcept |
Scales this parallelogram by the given amount, centred around the origin. More... | |
Parallelogram | operator+ (Point< ValueType > deltaPosition) const noexcept |
Returns a parallelogram which is the same as this one moved by a given amount. More... | |
Parallelogram & | operator+= (Point< ValueType > deltaPosition) noexcept |
Moves this parallelogram by a given amount. More... | |
Parallelogram | operator- (Point< ValueType > deltaPosition) const noexcept |
Returns a parallelogram which is the same as this one moved by a given amount. More... | |
Parallelogram & | operator-= (Point< ValueType > deltaPosition) noexcept |
Moves this parallelogram by a given amount. More... | |
Parallelogram & | operator= (const Parallelogram &)=default |
bool | operator== (const Parallelogram &other) const noexcept |
Returns true if the two parallelograms are identical. More... | |
Parallelogram | transformedBy (const AffineTransform &transform) const noexcept |
Returns a transformed verstion of the parallelogram. More... | |
Public Attributes | |
Point< ValueType > | bottomLeft |
Point< ValueType > | topLeft |
Point< ValueType > | topRight |
Represents a parallelogram that is defined by 3 points.
{Graphics}
|
default |
Creates a parallelogram with zero size at the origin.
|
default |
Creates a copy of another parallelogram.
|
inlinenoexcept |
Creates a parallelogram based on 3 points.
|
inlinenoexcept |
Creates a parallelogram from a rectangle.
|
default |
Destructor.
Referenced by juce::Parallelogram< float >::Parallelogram().
|
inlinenoexcept |
Returns the parallelogram's bottom-left position as a Point.
|
inlinenoexcept |
Returns the parallelogram's bottom-right position as a Point.
Referenced by juce::Parallelogram< float >::getBoundingBox().
|
inlinenoexcept |
Returns the smallest rectangle that encloses this parallelogram.
|
inlinenoexcept |
Returns the height of the parallelogram (i.e.
the straight-line distance between the top-left and bottom-left.
|
inlinenoexcept |
Returns a point within this parallelogram, specified as proportional coordinates.
The relative X and Y values should be between 0 and 1, where 0 is the left or top of this parallelogram, and 1 is the right or bottom. (Out-of-bounds values will return a point outside the parallelogram).
|
inlinenoexcept |
Returns the parallelogram's top-left position as a Point.
|
inlinenoexcept |
Returns the parallelogram's top-right position as a Point.
|
inlinenoexcept |
Returns the width of the parallelogram (i.e.
the straight-line distance between the top-left and top-right.
|
inlinenoexcept |
Returns true if the parallelogram has a width or height of more than zero.
|
inlinenoexcept |
Returns true if the parallelogram's coordinates are all finite numbers, i.e.
not NaN or infinity.
|
inlinenoexcept |
Returns true if the two parallelograms are not identical.
|
inlinenoexcept |
Returns a parallelogram that has been scaled by the given amount, centred around the origin.
|
inlinenoexcept |
Scales this parallelogram by the given amount, centred around the origin.
|
inlinenoexcept |
Returns a parallelogram which is the same as this one moved by a given amount.
Referenced by juce::Parallelogram< float >::operator-().
|
inlinenoexcept |
Moves this parallelogram by a given amount.
|
inlinenoexcept |
Returns a parallelogram which is the same as this one moved by a given amount.
|
inlinenoexcept |
Moves this parallelogram by a given amount.
Referenced by juce::Parallelogram< float >::operator-=().
|
default |
Referenced by juce::Parallelogram< float >::Parallelogram().
|
inlinenoexcept |
Returns true if the two parallelograms are identical.
Referenced by juce::Parallelogram< float >::operator!=().
|
inlinenoexcept |
Returns a transformed verstion of the parallelogram.
Point<ValueType> juce::Parallelogram< ValueType >::bottomLeft |
Referenced by juce::Parallelogram< float >::getBottomLeft(), juce::Parallelogram< float >::getBottomRight(), juce::Parallelogram< float >::getBoundingBox(), juce::Parallelogram< float >::getHeight(), juce::Parallelogram< float >::getRelativePoint(), juce::Parallelogram< float >::isEmpty(), juce::Parallelogram< float >::isFinite(), juce::Parallelogram< float >::operator*=(), juce::Parallelogram< float >::operator+=(), and juce::Parallelogram< float >::operator==().
Point<ValueType> juce::Parallelogram< ValueType >::topLeft |
Referenced by juce::Parallelogram< float >::getBottomRight(), juce::Parallelogram< float >::getBoundingBox(), juce::Parallelogram< float >::getHeight(), juce::Parallelogram< float >::getRelativePoint(), juce::Parallelogram< float >::getTopLeft(), juce::Parallelogram< float >::getWidth(), juce::Parallelogram< float >::isEmpty(), juce::Parallelogram< float >::isFinite(), juce::Parallelogram< float >::operator*=(), juce::Parallelogram< float >::operator+=(), and juce::Parallelogram< float >::operator==().
Point<ValueType> juce::Parallelogram< ValueType >::topRight |
Referenced by juce::Parallelogram< float >::getBottomRight(), juce::Parallelogram< float >::getBoundingBox(), juce::Parallelogram< float >::getRelativePoint(), juce::Parallelogram< float >::getTopRight(), juce::Parallelogram< float >::getWidth(), juce::Parallelogram< float >::isEmpty(), juce::Parallelogram< float >::isFinite(), juce::Parallelogram< float >::operator*=(), juce::Parallelogram< float >::operator+=(), and juce::Parallelogram< float >::operator==().