|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
An X-Y position stored as a pair of RelativeCoordinate values. More...
#include "juce_RelativePoint.h"
Public Member Functions | |
| RelativePoint () | |
| Creates a point at the origin. | |
| RelativePoint (Point< float > absolutePoint) | |
| Creates an absolute point, relative to the origin. | |
| RelativePoint (float absoluteX, float absoluteY) | |
| Creates an absolute point, relative to the origin. | |
| RelativePoint (const RelativeCoordinate &x, const RelativeCoordinate &y) | |
| Creates an absolute point from two coordinates. | |
| RelativePoint (const String &stringVersion) | |
| Creates a point from a stringified representation. | |
| bool | operator== (const RelativePoint &) const noexcept |
| bool | operator!= (const RelativePoint &) const noexcept |
| Point< float > | resolve (const Expression::Scope *evaluationContext) const |
| Calculates the absolute position of this point. | |
| void | moveToAbsolute (Point< float > newPos, const Expression::Scope *evaluationContext) |
| Changes the values of this point's coordinates to make it resolve to the specified position. | |
| String | toString () const |
| Returns a string which represents this point. | |
| bool | isDynamic () const |
| Returns true if this point depends on any other coordinates for its position. | |
Public Attributes | |
| RelativeCoordinate | x |
| RelativeCoordinate | y |
An X-Y position stored as a pair of RelativeCoordinate values.
@tags{GUI}
Definition at line 37 of file juce_RelativePoint.h.
| juce::RelativePoint::RelativePoint | ( | ) |
Creates a point at the origin.
Definition at line 41 of file juce_RelativePoint.cpp.
Creates an absolute point, relative to the origin.
Definition at line 45 of file juce_RelativePoint.cpp.
Creates an absolute point, relative to the origin.
Definition at line 50 of file juce_RelativePoint.cpp.
| juce::RelativePoint::RelativePoint | ( | const RelativeCoordinate & | x, |
| const RelativeCoordinate & | y | ||
| ) |
Creates an absolute point from two coordinates.
Definition at line 55 of file juce_RelativePoint.cpp.
Creates a point from a stringified representation.
The string must contain a pair of coordinates, separated by space or a comma. The syntax for the coordinate strings is explained in the RelativeCoordinate class.
Definition at line 60 of file juce_RelativePoint.cpp.
| bool juce::RelativePoint::isDynamic | ( | ) | const |
Returns true if this point depends on any other coordinates for its position.
Definition at line 96 of file juce_RelativePoint.cpp.
| void juce::RelativePoint::moveToAbsolute | ( | Point< float > | newPos, |
| const Expression::Scope * | evaluationContext | ||
| ) |
Changes the values of this point's coordinates to make it resolve to the specified position.
Calling this will leave any anchor points unchanged, but will set any absolute or relative positions to whatever values are necessary to make the resultant position match the position that is provided.
Definition at line 85 of file juce_RelativePoint.cpp.
|
noexcept |
Definition at line 74 of file juce_RelativePoint.cpp.
|
noexcept |
Definition at line 69 of file juce_RelativePoint.cpp.
| Point< float > juce::RelativePoint::resolve | ( | const Expression::Scope * | evaluationContext | ) | const |
Calculates the absolute position of this point.
You'll need to provide a suitable Expression::Scope for looking up any coordinates that may be needed to calculate the result.
Definition at line 79 of file juce_RelativePoint.cpp.
| String juce::RelativePoint::toString | ( | ) | const |
Returns a string which represents this point.
This returns a comma-separated pair of coordinates. For details of the string syntax used by the coordinates, see the RelativeCoordinate constructor notes. The string that is returned can be passed to the RelativePoint constructor to recreate the point.
Definition at line 91 of file juce_RelativePoint.cpp.
| RelativeCoordinate juce::RelativePoint::x |
Definition at line 88 of file juce_RelativePoint.h.
| RelativeCoordinate juce::RelativePoint::y |
Definition at line 88 of file juce_RelativePoint.h.