diff --git a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp index 133798d2fa..e08b20bffd 100644 --- a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp @@ -245,12 +245,12 @@ int MidiKeyboardComponent::xyToNote (const Point& pos, float& mousePosition if (orientation != horizontalKeyboard) { - p = Point (p.getY(), p.getX()); + p = Point (p.y, p.x); if (orientation == verticalKeyboardFacingLeft) - p = Point (p.getX(), getWidth() - p.getY()); + p = Point (p.x, getWidth() - p.y); else - p = Point (getHeight() - p.getX(), p.getY()); + p = Point (getHeight() - p.x, p.y); } return remappedXYToNote (p + Point (xOffset, 0), mousePositionVelocity); @@ -272,9 +272,9 @@ int MidiKeyboardComponent::remappedXYToNote (const Point& pos, float& mouse getKeyPos (note, kx, kw); kx += xOffset; - if (pos.getX() >= kx && pos.getX() < kx + kw) + if (pos.x >= kx && pos.x < kx + kw) { - mousePositionVelocity = pos.getY() / (float) blackNoteLength; + mousePositionVelocity = pos.y / (float) blackNoteLength; return note; } } @@ -294,10 +294,10 @@ int MidiKeyboardComponent::remappedXYToNote (const Point& pos, float& mouse getKeyPos (note, kx, kw); kx += xOffset; - if (pos.getX() >= kx && pos.getX() < kx + kw) + if (pos.x >= kx && pos.x < kx + kw) { const int whiteNoteLength = (orientation == horizontalKeyboard) ? getHeight() : getWidth(); - mousePositionVelocity = pos.getY() / (float) whiteNoteLength; + mousePositionVelocity = pos.y / (float) whiteNoteLength; return note; } } diff --git a/modules/juce_graphics/colour/juce_ColourGradient.cpp b/modules/juce_graphics/colour/juce_ColourGradient.cpp index ed2bbc82a1..635e63ac72 100644 --- a/modules/juce_graphics/colour/juce_ColourGradient.cpp +++ b/modules/juce_graphics/colour/juce_ColourGradient.cpp @@ -30,7 +30,7 @@ ColourGradient::ColourGradient() noexcept { #if JUCE_DEBUG point1.setX (987654.0f); - #define JUCE_COLOURGRADIENT_CHECK_COORDS_INITIALISED jassert (point1.getX() != 987654.0f); + #define JUCE_COLOURGRADIENT_CHECK_COORDS_INITIALISED jassert (point1.x != 987654.0f); #else #define JUCE_COLOURGRADIENT_CHECK_COORDS_INITIALISED #endif diff --git a/modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp b/modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp index 9075f0771b..b017d49e46 100644 --- a/modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp +++ b/modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp @@ -199,24 +199,24 @@ public: p2 = Line (p2, p3).findNearestPointTo (p1); } - vertical = std::abs (p1.getX() - p2.getX()) < 0.001f; - horizontal = std::abs (p1.getY() - p2.getY()) < 0.001f; + vertical = std::abs (p1.x - p2.x) < 0.001f; + horizontal = std::abs (p1.y - p2.y) < 0.001f; if (vertical) { - scale = roundToInt ((numEntries << (int) numScaleBits) / (double) (p2.getY() - p1.getY())); - start = roundToInt (p1.getY() * scale); + scale = roundToInt ((numEntries << (int) numScaleBits) / (double) (p2.y - p1.y)); + start = roundToInt (p1.y * scale); } else if (horizontal) { - scale = roundToInt ((numEntries << (int) numScaleBits) / (double) (p2.getX() - p1.getX())); - start = roundToInt (p1.getX() * scale); + scale = roundToInt ((numEntries << (int) numScaleBits) / (double) (p2.x - p1.x)); + start = roundToInt (p1.x * scale); } else { - grad = (p2.getY() - p1.getY()) / (double) (p1.getX() - p2.getX()); - yTerm = p1.getY() - p1.getX() / grad; - scale = roundToInt ((numEntries << (int) numScaleBits) / (yTerm * grad - (p2.getY() * grad - p2.getX()))); + grad = (p2.getY() - p1.y) / (double) (p1.x - p2.x); + yTerm = p1.getY() - p1.x / grad; + scale = roundToInt ((numEntries << (int) numScaleBits) / (yTerm * grad - (p2.y * grad - p2.x))); grad *= scale; } } @@ -255,12 +255,12 @@ public: const PixelARGB* const lookupTable_, const int numEntries_) : lookupTable (lookupTable_), numEntries (numEntries_), - gx1 (gradient.point1.getX()), - gy1 (gradient.point1.getY()) + gx1 (gradient.point1.x), + gy1 (gradient.point1.y) { jassert (numEntries_ >= 0); const Point diff (gradient.point1 - gradient.point2); - maxDist = diff.getX() * diff.getX() + diff.getY() * diff.getY(); + maxDist = diff.x * diff.x + diff.y * diff.y; invScale = numEntries / std::sqrt (maxDist); jassert (roundToInt (std::sqrt (maxDist) * invScale) <= numEntries); } @@ -1296,7 +1296,7 @@ public: void translate (const Point& delta) { - edgeTable.translate ((float) delta.getX(), delta.getY()); + edgeTable.translate ((float) delta.x, delta.y); } bool clipRegionIntersects (const Rectangle& r) const @@ -1452,7 +1452,7 @@ public: void translate (const Point& delta) { - clip.offsetAll (delta.getX(), delta.getY()); + clip.offsetAll (delta.x, delta.y); } bool clipRegionIntersects (const Rectangle& r) const @@ -2080,7 +2080,7 @@ LowLevelGraphicsSoftwareRenderer::LowLevelGraphicsSoftwareRenderer (const Image& LowLevelGraphicsSoftwareRenderer::LowLevelGraphicsSoftwareRenderer (const Image& image, const Point& origin, const RectangleList& initialClip) - : savedState (new SavedState (image, initialClip, origin.getX(), origin.getY())) + : savedState (new SavedState (image, initialClip, origin.x, origin.y)) { } diff --git a/modules/juce_graphics/geometry/juce_Line.h b/modules/juce_graphics/geometry/juce_Line.h index 7170631d56..048b752e73 100644 --- a/modules/juce_graphics/geometry/juce_Line.h +++ b/modules/juce_graphics/geometry/juce_Line.h @@ -86,16 +86,16 @@ public: //============================================================================== /** Returns the x co-ordinate of the line's start point. */ - inline ValueType getStartX() const noexcept { return start.getX(); } + inline ValueType getStartX() const noexcept { return start.x; } /** Returns the y co-ordinate of the line's start point. */ - inline ValueType getStartY() const noexcept { return start.getY(); } + inline ValueType getStartY() const noexcept { return start.y; } /** Returns the x co-ordinate of the line's end point. */ - inline ValueType getEndX() const noexcept { return end.getX(); } + inline ValueType getEndX() const noexcept { return end.x; } /** Returns the y co-ordinate of the line's end point. */ - inline ValueType getEndY() const noexcept { return end.getY(); } + inline ValueType getEndY() const noexcept { return end.y; } /** Returns the line's start point. */ inline const Point& getStart() const noexcept { return start; } @@ -130,10 +130,10 @@ public: ValueType getLength() const noexcept { return start.getDistanceFrom (end); } /** Returns true if the line's start and end x co-ordinates are the same. */ - bool isVertical() const noexcept { return start.getX() == end.getX(); } + bool isVertical() const noexcept { return start.x == end.x; } /** Returns true if the line's start and end y co-ordinates are the same. */ - bool isHorizontal() const noexcept { return start.getY() == end.getY(); } + bool isHorizontal() const noexcept { return start.y == end.y; } /** Returns the line's angle. @@ -209,13 +209,13 @@ public: ValueType perpendicularDistance) const noexcept { const Point delta (end - start); - const double length = juce_hypot ((double) delta.getX(), - (double) delta.getY()); + const double length = juce_hypot ((double) delta.x, + (double) delta.y); if (length <= 0) return start; - return Point (start.getX() + (ValueType) ((delta.getX() * distanceFromStart - delta.getY() * perpendicularDistance) / length), - start.getY() + (ValueType) ((delta.getY() * distanceFromStart + delta.getX() * perpendicularDistance) / length)); + return Point (start.x + (ValueType) ((delta.x * distanceFromStart - delta.y * perpendicularDistance) / length), + start.y + (ValueType) ((delta.y * distanceFromStart + delta.x * perpendicularDistance) / length)); } /** Returns the location of the point which is a given distance along this line @@ -248,12 +248,12 @@ public: Point& pointOnLine) const noexcept { const Point delta (end - start); - const double length = delta.getX() * delta.getX() + delta.getY() * delta.getY(); + const double length = delta.x * delta.x + delta.y * delta.y; if (length > 0) { - const double prop = ((targetPoint.getX() - start.getX()) * delta.getX() - + (targetPoint.getY() - start.getY()) * delta.getY()) / length; + const double prop = ((targetPoint.x - start.x) * delta.x + + (targetPoint.y - start.y) * delta.y) / length; if (prop >= 0 && prop <= 1.0) { @@ -288,12 +288,12 @@ public: ValueType findNearestProportionalPositionTo (const Point& point) const noexcept { const Point delta (end - start); - const double length = delta.getX() * delta.getX() + delta.getY() * delta.getY(); + const double length = delta.x * delta.x + delta.y * delta.y; return length <= 0 ? 0 : jlimit ((ValueType) 0, (ValueType) 1, - (ValueType) (((point.getX() - start.getX()) * delta.getX() - + (point.getY() - start.getY()) * delta.getY()) / length)); + (ValueType) (((point.x - start.x) * delta.x + + (point.y - start.y) * delta.y) / length)); } /** Finds the point on this line which is nearest to a given point. @@ -312,9 +312,9 @@ public: */ bool isPointAbove (const Point& point) const noexcept { - return start.getX() != end.getX() - && point.getY() < ((end.getY() - start.getY()) - * (point.getX() - start.getX())) / (end.getX() - start.getX()) + start.getY(); + return start.x != end.x + && point.y < ((end.y - start.y) + * (point.x - start.x)) / (end.x - start.x) + start.y; } //============================================================================== @@ -355,34 +355,34 @@ private: const Point d1 (p2 - p1); const Point d2 (p4 - p3); - const ValueType divisor = d1.getX() * d2.getY() - d2.getX() * d1.getY(); + const ValueType divisor = d1.x * d2.y - d2.x * d1.y; if (divisor == 0) { if (! (d1.isOrigin() || d2.isOrigin())) { - if (d1.getY() == 0 && d2.getY() != 0) + if (d1.y == 0 && d2.y != 0) { - const ValueType along = (p1.getY() - p3.getY()) / d2.getY(); - intersection = p1.withX (p3.getX() + along * d2.getX()); + const ValueType along = (p1.y - p3.y) / d2.y; + intersection = p1.withX (p3.x + along * d2.x); return along >= 0 && along <= (ValueType) 1; } - else if (d2.getY() == 0 && d1.getY() != 0) + else if (d2.y == 0 && d1.y != 0) { - const ValueType along = (p3.getY() - p1.getY()) / d1.getY(); - intersection = p3.withX (p1.getX() + along * d1.getX()); + const ValueType along = (p3.y - p1.y) / d1.y; + intersection = p3.withX (p1.x + along * d1.x); return along >= 0 && along <= (ValueType) 1; } - else if (d1.getX() == 0 && d2.getX() != 0) + else if (d1.x == 0 && d2.x != 0) { - const ValueType along = (p1.getX() - p3.getX()) / d2.getX(); - intersection = p1.withY (p3.getY() + along * d2.getY()); + const ValueType along = (p1.x - p3.x) / d2.x; + intersection = p1.withY (p3.y + along * d2.y); return along >= 0 && along <= (ValueType) 1; } - else if (d2.getX() == 0 && d1.getX() != 0) + else if (d2.x == 0 && d1.x != 0) { - const ValueType along = (p3.getX() - p1.getX()) / d1.getX(); - intersection = p3.withY (p1.getY() + along * d1.getY()); + const ValueType along = (p3.x - p1.x) / d1.x; + intersection = p3.withY (p1.y + along * d1.y); return along >= 0 && along <= (ValueType) 1; } } @@ -391,13 +391,13 @@ private: return false; } - const ValueType along1 = ((p1.getY() - p3.getY()) * d2.getX() - (p1.getX() - p3.getX()) * d2.getY()) / divisor; + const ValueType along1 = ((p1.y - p3.y) * d2.x - (p1.x - p3.x) * d2.y) / divisor; intersection = p1 + d1 * along1; if (along1 < 0 || along1 > (ValueType) 1) return false; - const ValueType along2 = ((p1.getY() - p3.getY()) * d1.getX() - (p1.getX() - p3.getX()) * d1.getY()) / divisor; + const ValueType along2 = ((p1.y - p3.y) * d1.x - (p1.x - p3.x) * d1.y) / divisor; return along2 >= 0 && along2 <= (ValueType) 1; } }; diff --git a/modules/juce_graphics/geometry/juce_Path.cpp b/modules/juce_graphics/geometry/juce_Path.cpp index 6dde964e59..72454ca69d 100644 --- a/modules/juce_graphics/geometry/juce_Path.cpp +++ b/modules/juce_graphics/geometry/juce_Path.cpp @@ -251,7 +251,7 @@ void Path::startNewSubPath (const float x, const float y) void Path::startNewSubPath (const Point& start) { - startNewSubPath (start.getX(), start.getY()); + startNewSubPath (start.x, start.y); } void Path::lineTo (const float x, const float y) @@ -275,7 +275,7 @@ void Path::lineTo (const float x, const float y) void Path::lineTo (const Point& end) { - lineTo (end.getX(), end.getY()); + lineTo (end.x, end.y); } void Path::quadraticTo (const float x1, const float y1, @@ -304,8 +304,8 @@ void Path::quadraticTo (const float x1, const float y1, void Path::quadraticTo (const Point& controlPoint, const Point& endPoint) { - quadraticTo (controlPoint.getX(), controlPoint.getY(), - endPoint.getX(), endPoint.getY()); + quadraticTo (controlPoint.x, controlPoint.y, + endPoint.x, endPoint.y); } void Path::cubicTo (const float x1, const float y1, @@ -339,9 +339,9 @@ void Path::cubicTo (const Point& controlPoint1, const Point& controlPoint2, const Point& endPoint) { - cubicTo (controlPoint1.getX(), controlPoint1.getY(), - controlPoint2.getX(), controlPoint2.getY(), - endPoint.getX(), endPoint.getY()); + cubicTo (controlPoint1.x, controlPoint1.y, + controlPoint2.x, controlPoint2.y, + endPoint.x, endPoint.y); } void Path::closeSubPath() @@ -572,7 +572,7 @@ void Path::addPieSegment (const float x, const float y, radiusY *= innerCircleProportionalSize; startNewSubPath (centre.getPointOnCircumference (radiusX, radiusY, toRadians)); - addArc (centre.getX() - radiusX, centre.getY() - radiusY, radiusX * 2.0f, radiusY * 2.0f, toRadians, fromRadians); + addArc (centre.x - radiusX, centre.y - radiusY, radiusX * 2.0f, radiusY * 2.0f, toRadians, fromRadians); } } else @@ -582,7 +582,7 @@ void Path::addPieSegment (const float x, const float y, radiusX *= innerCircleProportionalSize; radiusY *= innerCircleProportionalSize; - addArc (centre.getX() - radiusX, centre.getY() - radiusY, radiusX * 2.0f, radiusY * 2.0f, toRadians, fromRadians); + addArc (centre.x - radiusX, centre.y - radiusY, radiusX * 2.0f, radiusY * 2.0f, toRadians, fromRadians); } else { @@ -1016,7 +1016,7 @@ bool Path::contains (const float x, const float y, const float tolerance) const bool Path::contains (const Point& point, const float tolerance) const { - return contains (point.getX(), point.getY(), tolerance); + return contains (point.x, point.y, tolerance); } bool Path::intersectsLine (const Line& line, const float tolerance) diff --git a/modules/juce_graphics/geometry/juce_Point.h b/modules/juce_graphics/geometry/juce_Point.h index b2c456cecb..879a3eafd4 100644 --- a/modules/juce_graphics/geometry/juce_Point.h +++ b/modules/juce_graphics/geometry/juce_Point.h @@ -168,9 +168,9 @@ public: /** Returns the point as a string in the form "x, y". */ String toString() const { return String (x) + ", " + String (y); } -private: //============================================================================== - ValueType x, y; + ValueType x; /**< The point's X coordinate. */ + ValueType y; /**< The point's Y coordinate. */ }; diff --git a/modules/juce_graphics/geometry/juce_Rectangle.h b/modules/juce_graphics/geometry/juce_Rectangle.h index 563a16e07f..6c89c76d19 100644 --- a/modules/juce_graphics/geometry/juce_Rectangle.h +++ b/modules/juce_graphics/geometry/juce_Rectangle.h @@ -73,10 +73,10 @@ public: /** Creates a Rectangle from the positions of two opposite corners. */ Rectangle (const Point& corner1, const Point& corner2) noexcept - : x (jmin (corner1.getX(), corner2.getX())), - y (jmin (corner1.getY(), corner2.getY())), - w (corner1.getX() - corner2.getX()), - h (corner1.getY() - corner2.getY()) + : x (jmin (corner1.x, corner2.x)), + y (jmin (corner1.y, corner2.y)), + w (corner1.x - corner2.x), + h (corner1.y - corner2.y) { if (w < ValueType()) w = -w; if (h < ValueType()) h = -h; @@ -143,7 +143,7 @@ public: Point getPosition() const noexcept { return Point (x, y); } /** Changes the position of the rectangle's top-left corner (leaving its size unchanged). */ - void setPosition (const Point& newPos) noexcept { x = newPos.getX(); y = newPos.getY(); } + void setPosition (const Point& newPos) noexcept { x = newPos.x; y = newPos.y; } /** Changes the position of the rectangle's top-left corner (leaving its size unchanged). */ void setPosition (const ValueType newX, const ValueType newY) noexcept { x = newX; y = newY; } @@ -152,7 +152,7 @@ public: Rectangle withPosition (const ValueType newX, const ValueType newY) const noexcept { return Rectangle (newX, newY, w, h); } /** Returns a rectangle with the same size as this one, but a new position. */ - Rectangle withPosition (const Point& newPos) const noexcept { return Rectangle (newPos.getX(), newPos.getY(), w, h); } + Rectangle withPosition (const Point& newPos) const noexcept { return Rectangle (newPos.x, newPos.y, w, h); } /** Returns the rectangle's top-left position as a Point. */ Point getTopLeft() const noexcept { return getPosition(); } @@ -286,26 +286,26 @@ public: /** Returns a rectangle which is the same as this one moved by a given amount. */ Rectangle operator+ (const Point& deltaPosition) const noexcept { - return Rectangle (x + deltaPosition.getX(), y + deltaPosition.getY(), w, h); + return Rectangle (x + deltaPosition.x, y + deltaPosition.y, w, h); } /** Moves this rectangle by a given amount. */ Rectangle& operator+= (const Point& deltaPosition) noexcept { - x += deltaPosition.getX(); y += deltaPosition.getY(); + x += deltaPosition.x; y += deltaPosition.y; return *this; } /** Returns a rectangle which is the same as this one moved by a given amount. */ Rectangle operator- (const Point& deltaPosition) const noexcept { - return Rectangle (x - deltaPosition.getX(), y - deltaPosition.getY(), w, h); + return Rectangle (x - deltaPosition.x, y - deltaPosition.y, w, h); } /** Moves this rectangle by a given amount. */ Rectangle& operator-= (const Point& deltaPosition) noexcept { - x -= deltaPosition.getX(); y -= deltaPosition.getY(); + x -= deltaPosition.x; y -= deltaPosition.y; return *this; } @@ -447,7 +447,7 @@ public: /** Returns true if this co-ordinate is inside the rectangle. */ bool contains (const Point& point) const noexcept { - return point.getX() >= x && point.getY() >= y && point.getX() < x + w && point.getY() < y + h; + return point.x >= x && point.y >= y && point.x < x + w && point.y < y + h; } /** Returns true if this other rectangle is completely inside this one. */ @@ -460,8 +460,8 @@ public: /** Returns the nearest point to the specified point that lies within this rectangle. */ Point getConstrainedPoint (const Point& point) const noexcept { - return Point (jlimit (x, x + w, point.getX()), - jlimit (y, y + h, point.getY())); + return Point (jlimit (x, x + w, point.x), + jlimit (y, y + h, point.y)); } /** Returns true if any part of another rectangle overlaps this one. */ @@ -635,17 +635,17 @@ public: if (numPoints == 0) return Rectangle(); - ValueType minX (points[0].getX()); + ValueType minX (points[0].x); ValueType maxX (minX); - ValueType minY (points[0].getY()); + ValueType minY (points[0].y); ValueType maxY (minY); for (int i = 1; i < numPoints; ++i) { - minX = jmin (minX, points[i].getX()); - maxX = jmax (maxX, points[i].getX()); - minY = jmin (minY, points[i].getY()); - maxY = jmax (maxY, points[i].getY()); + minX = jmin (minX, points[i].x); + maxX = jmax (maxX, points[i].x); + minY = jmin (minY, points[i].y); + maxY = jmax (maxY, points[i].y); } return Rectangle (minX, minY, maxX - minX, maxY - minY); diff --git a/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm b/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm index 49e43c33b2..577813f3df 100644 --- a/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm +++ b/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm @@ -662,7 +662,7 @@ CGShadingRef CoreGraphicsContext::SavedState::getShading (CoreGraphicsContext& o numGradientLookupEntries = g.createLookupTable (fillType.transform, gradientLookupTable) - 1; CGFunctionRef function = CGFunctionCreate (this, 1, 0, 4, 0, &(owner.gradientCallbacks)); - CGPoint p1 (CGPointMake (g.point1.getX(), g.point1.getY())); + CGPoint p1 (CGPointMake (g.point1.x, g.point1.y)); if (g.isRadial) { @@ -673,7 +673,7 @@ CGShadingRef CoreGraphicsContext::SavedState::getShading (CoreGraphicsContext& o else { shading = CGShadingCreateAxial (owner.rgbColourSpace, p1, - CGPointMake (g.point2.getX(), g.point2.getY()), + CGPointMake (g.point2.x, g.point2.y), function, true, true); } diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index 70b86630f2..ecca9377a6 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -213,9 +213,9 @@ public: //============================================================================== static inline bool hitTest (Component& comp, const Point& localPoint) { - return isPositiveAndBelow (localPoint.getX(), comp.getWidth()) - && isPositiveAndBelow (localPoint.getY(), comp.getHeight()) - && comp.hitTest (localPoint.getX(), localPoint.getY()); + return isPositiveAndBelow (localPoint.x, comp.getWidth()) + && isPositiveAndBelow (localPoint.y, comp.getHeight()) + && comp.hitTest (localPoint.x, localPoint.y); } static Point convertFromParentSpace (const Component& comp, const Point& pointInParentSpace) @@ -354,7 +354,7 @@ public: if (c->isOpaque() && c->componentTransparency == 0) { Rectangle childBounds (c->bounds.getIntersection (clipRect)); - childBounds.translate (delta.getX(), delta.getY()); + childBounds.translate (delta.x, delta.y); result.subtract (childBounds); } @@ -608,7 +608,7 @@ void Component::addToDesktop (int styleWanted, void* nativeWindowToAttachTo) Desktop::getInstance().addDesktopComponent (this); bounds.setPosition (topLeft); - peer->setBounds (topLeft.getX(), topLeft.getY(), getWidth(), getHeight(), false); + peer->setBounds (topLeft.x, topLeft.y, getWidth(), getHeight(), false); peer->setVisible (isVisible()); @@ -908,8 +908,8 @@ int Component::getParentHeight() const noexcept : getParentMonitorArea().getHeight(); } -int Component::getScreenX() const { return getScreenPosition().getX(); } -int Component::getScreenY() const { return getScreenPosition().getY(); } +int Component::getScreenX() const { return getScreenPosition().x; } +int Component::getScreenY() const { return getScreenPosition().y; } Point Component::getScreenPosition() const { return localPointToGlobal (Point()); } Rectangle Component::getScreenBounds() const { return localAreaToGlobal (getLocalBounds()); } @@ -1065,7 +1065,7 @@ void Component::setTopLeftPosition (const int x, const int y) void Component::setTopLeftPosition (const Point& pos) { - setBounds (pos.getX(), pos.getY(), getWidth(), getHeight()); + setBounds (pos.x, pos.y, getWidth(), getHeight()); } void Component::setTopRightPosition (const int x, const int y) diff --git a/modules/juce_gui_basics/drawables/juce_Drawable.cpp b/modules/juce_gui_basics/drawables/juce_Drawable.cpp index 8d2aaeaa3a..a65c0e8b87 100644 --- a/modules/juce_gui_basics/drawables/juce_Drawable.cpp +++ b/modules/juce_gui_basics/drawables/juce_Drawable.cpp @@ -48,8 +48,8 @@ void Drawable::nonConstDraw (Graphics& g, float opacity, const AffineTransform& const float oldOpacity = getAlpha(); setAlpha (opacity); - g.addTransform (AffineTransform::translation ((float) -originRelativeToComponent.getX(), - (float) -originRelativeToComponent.getY()) + g.addTransform (AffineTransform::translation ((float) -(originRelativeToComponent.x), + (float) -(originRelativeToComponent.y)) .followedBy (getTransform()) .followedBy (transform)); @@ -77,8 +77,8 @@ DrawableComposite* Drawable::getParent() const void Drawable::transformContextToCorrectOrigin (Graphics& g) { - g.setOrigin (originRelativeToComponent.getX(), - originRelativeToComponent.getY()); + g.setOrigin (originRelativeToComponent.x, + originRelativeToComponent.y); } void Drawable::parentHierarchyChanged() @@ -101,7 +101,7 @@ void Drawable::setBoundsToEnclose (const Rectangle& area) //============================================================================== void Drawable::setOriginWithOriginalSize (const Point& originWithinParent) { - setTransform (AffineTransform::translation (originWithinParent.getX(), originWithinParent.getY())); + setTransform (AffineTransform::translation (originWithinParent.x, originWithinParent.y)); } void Drawable::setTransformToFit (const Rectangle& area, const RectanglePlacement& placement) diff --git a/modules/juce_gui_basics/drawables/juce_DrawableComposite.cpp b/modules/juce_gui_basics/drawables/juce_DrawableComposite.cpp index acde320e1f..7e7c67c2f4 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableComposite.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableComposite.cpp @@ -154,9 +154,9 @@ void DrawableComposite::recalculateCoordinates (Expression::Scope* scope) const Rectangle content (getContentArea().resolve (scope)); - AffineTransform t (AffineTransform::fromTargetPoints (content.getX(), content.getY(), resolved[0].getX(), resolved[0].getY(), - content.getRight(), content.getY(), resolved[1].getX(), resolved[1].getY(), - content.getX(), content.getBottom(), resolved[2].getX(), resolved[2].getY())); + AffineTransform t (AffineTransform::fromTargetPoints (content.getX(), content.getY(), resolved[0].x, resolved[0].y, + content.getRight(), content.getY(), resolved[1].x, resolved[1].y, + content.getX(), content.getBottom(), resolved[2].x, resolved[2].y)); if (t.isSingularity()) t = AffineTransform::identity; diff --git a/modules/juce_gui_basics/drawables/juce_DrawableImage.cpp b/modules/juce_gui_basics/drawables/juce_DrawableImage.cpp index 8453868b14..2f7029310c 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableImage.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableImage.cpp @@ -108,9 +108,9 @@ void DrawableImage::recalculateCoordinates (Expression::Scope* scope) const Point tr (resolved[0] + (resolved[1] - resolved[0]) / (float) image.getWidth()); const Point bl (resolved[0] + (resolved[2] - resolved[0]) / (float) image.getHeight()); - AffineTransform t (AffineTransform::fromTargetPoints (resolved[0].getX(), resolved[0].getY(), - tr.getX(), tr.getY(), - bl.getX(), bl.getY())); + AffineTransform t (AffineTransform::fromTargetPoints (resolved[0].x, resolved[0].y, + tr.x, tr.y, + bl.x, bl.y)); if (t.isSingularity()) t = AffineTransform::identity; diff --git a/modules/juce_gui_basics/drawables/juce_DrawableRectangle.cpp b/modules/juce_gui_basics/drawables/juce_DrawableRectangle.cpp index 745b668ecd..975bbc00eb 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableRectangle.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableRectangle.cpp @@ -106,9 +106,9 @@ void DrawableRectangle::recalculateCoordinates (Expression::Scope* scope) else newPath.addRectangle (0, 0, w, h); - newPath.applyTransform (AffineTransform::fromTargetPoints (0, 0, points[0].getX(), points[0].getY(), - w, 0, points[1].getX(), points[1].getY(), - 0, h, points[2].getX(), points[2].getY())); + newPath.applyTransform (AffineTransform::fromTargetPoints (0, 0, points[0].x, points[0].y, + w, 0, points[1].x, points[1].y, + 0, h, points[2].x, points[2].y)); if (path != newPath) { diff --git a/modules/juce_gui_basics/drawables/juce_DrawableShape.cpp b/modules/juce_gui_basics/drawables/juce_DrawableShape.cpp index 97b810b657..5facd8ae01 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableShape.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableShape.cpp @@ -203,8 +203,8 @@ bool DrawableShape::hitTest (int x, int y) if (! allowsClicksOnThisComponent) return false; - const float globalX = (float) (x - originRelativeToComponent.getX()); - const float globalY = (float) (y - originRelativeToComponent.getY()); + const float globalX = (float) (x - originRelativeToComponent.x); + const float globalY = (float) (y - originRelativeToComponent.y); return path.contains (globalX, globalY) || (isStrokeVisible() && strokePath.contains (globalX, globalY)); @@ -224,8 +224,8 @@ DrawableShape::RelativeFillType::RelativeFillType (const FillType& fill_) gradientPoint1 = g.point1.transformedBy (fill.transform); gradientPoint2 = g.point2.transformedBy (fill.transform); - gradientPoint3 = Point (g.point1.getX() + g.point2.getY() - g.point1.getY(), - g.point1.getY() + g.point1.getX() - g.point2.getX()) + gradientPoint3 = Point (g.point1.x + g.point2.y - g.point1.y, + g.point1.y + g.point1.x - g.point2.x) .transformedBy (fill.transform); fill.transform = AffineTransform::identity; } @@ -275,12 +275,12 @@ bool DrawableShape::RelativeFillType::recalculateCoords (Expression::Scope* scop if (g.isRadial) { const Point g3 (gradientPoint3.resolve (scope)); - const Point g3Source (g1.getX() + g2.getY() - g1.getY(), - g1.getY() + g1.getX() - g2.getX()); + const Point g3Source (g1.x + g2.y - g1.y, + g1.y + g1.x - g2.x); - t = AffineTransform::fromTargetPoints (g1.getX(), g1.getY(), g1.getX(), g1.getY(), - g2.getX(), g2.getY(), g2.getX(), g2.getY(), - g3Source.getX(), g3Source.getY(), g3.getX(), g3.getY()); + t = AffineTransform::fromTargetPoints (g1.x, g1.y, g1.x, g1.y, + g2.x, g2.y, g2.x, g2.y, + g3Source.x, g3Source.y, g3.x, g3.y); } if (g.point1 != g1 || g.point2 != g2 || fill.transform != t) diff --git a/modules/juce_gui_basics/drawables/juce_DrawableText.cpp b/modules/juce_gui_basics/drawables/juce_DrawableText.cpp index 1ac7a21ea3..12195304f5 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableText.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableText.cpp @@ -140,8 +140,8 @@ void DrawableText::recalculateCoordinates (Expression::Scope* scope) const float h = Line (resolvedPoints[0], resolvedPoints[2]).getLength(); const Point fontCoords (RelativeParallelogram::getInternalCoordForPoint (resolvedPoints, fontSizeControlPoint.resolve (scope))); - const float fontHeight = jlimit (0.01f, jmax (0.01f, h), fontCoords.getY()); - const float fontWidth = jlimit (0.01f, jmax (0.01f, w), fontCoords.getX()); + const float fontHeight = jlimit (0.01f, jmax (0.01f, h), fontCoords.y); + const float fontWidth = jlimit (0.01f, jmax (0.01f, w), fontCoords.x); scaledFont = font; scaledFont.setHeight (fontHeight); @@ -158,9 +158,9 @@ const AffineTransform DrawableText::getArrangementAndTransform (GlyphArrangement glyphs.addFittedText (scaledFont, text, 0, 0, w, h, justification, 0x100000); - return AffineTransform::fromTargetPoints (0, 0, resolvedPoints[0].getX(), resolvedPoints[0].getY(), - w, 0, resolvedPoints[1].getX(), resolvedPoints[1].getY(), - 0, h, resolvedPoints[2].getX(), resolvedPoints[2].getY()); + return AffineTransform::fromTargetPoints (0, 0, resolvedPoints[0].x, resolvedPoints[0].y, + w, 0, resolvedPoints[1].x, resolvedPoints[1].y, + 0, h, resolvedPoints[2].x, resolvedPoints[2].y); } //============================================================================== diff --git a/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp b/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp index 9c76043c82..c4dff5426a 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp +++ b/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp @@ -91,9 +91,9 @@ public: if (isMoving) { - left += (destination.getX() - left) * delta; - top += (destination.getY() - top) * delta; - right += (destination.getRight() - right) * delta; + left += (destination.getX() - left) * delta; + top += (destination.getY() - top) * delta; + right += (destination.getRight() - right) * delta; bottom += (destination.getBottom() - bottom) * delta; const Rectangle newBounds (roundToInt (left), diff --git a/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.cpp b/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.cpp index 17692b7ebf..cc21cc6a1b 100644 --- a/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.cpp +++ b/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.cpp @@ -53,15 +53,15 @@ const ResizableBorderComponent::Zone ResizableBorderComponent::Zone::fromPositio && ! border.subtractedFrom (totalSize).contains (position)) { const int minW = jmax (totalSize.getWidth() / 10, jmin (10, totalSize.getWidth() / 3)); - if (position.getX() < jmax (border.getLeft(), minW) && border.getLeft() > 0) + if (position.x < jmax (border.getLeft(), minW) && border.getLeft() > 0) z |= left; - else if (position.getX() >= totalSize.getWidth() - jmax (border.getRight(), minW) && border.getRight() > 0) + else if (position.x >= totalSize.getWidth() - jmax (border.getRight(), minW) && border.getRight() > 0) z |= right; const int minH = jmax (totalSize.getHeight() / 10, jmin (10, totalSize.getHeight() / 3)); - if (position.getY() < jmax (border.getTop(), minH) && border.getTop() > 0) + if (position.y < jmax (border.getTop(), minH) && border.getTop() > 0) z |= top; - else if (position.getY() >= totalSize.getHeight() - jmax (border.getBottom(), minH) && border.getBottom() > 0) + else if (position.y >= totalSize.getHeight() - jmax (border.getBottom(), minH) && border.getBottom() > 0) z |= bottom; } diff --git a/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h b/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h index 2033808f28..4968ce5c0e 100644 --- a/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h +++ b/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h @@ -146,16 +146,16 @@ public: return original + distance; if (isDraggingLeftEdge()) - original.setLeft (jmin (original.getRight(), original.getX() + distance.getX())); + original.setLeft (jmin (original.getRight(), original.getX() + distance.x)); if (isDraggingRightEdge()) - original.setWidth (jmax (ValueType(), original.getWidth() + distance.getX())); + original.setWidth (jmax (ValueType(), original.getWidth() + distance.x)); if (isDraggingTopEdge()) - original.setTop (jmin (original.getBottom(), original.getY() + distance.getY())); + original.setTop (jmin (original.getBottom(), original.getY() + distance.y)); if (isDraggingBottomEdge()) - original.setHeight (jmax (ValueType(), original.getHeight() + distance.getY())); + original.setHeight (jmax (ValueType(), original.getHeight() + distance.y)); return original; } diff --git a/modules/juce_gui_basics/layout/juce_Viewport.cpp b/modules/juce_gui_basics/layout/juce_Viewport.cpp index 3c3b5c911e..e87b9b46ff 100644 --- a/modules/juce_gui_basics/layout/juce_Viewport.cpp +++ b/modules/juce_gui_basics/layout/juce_Viewport.cpp @@ -102,8 +102,8 @@ int Viewport::getMaximumVisibleHeight() const { return contentHolder.getHeight Point Viewport::viewportPosToCompPos (const Point& pos) const { jassert (contentComp != nullptr); - return Point (jmax (jmin (0, contentHolder.getWidth() - contentComp->getWidth()), jmin (0, -pos.getX())), - jmax (jmin (0, contentHolder.getHeight() - contentComp->getHeight()), jmin (0, -pos.getY()))); + return Point (jmax (jmin (0, contentHolder.getWidth() - contentComp->getWidth()), jmin (0, -(pos.x))), + jmax (jmin (0, contentHolder.getHeight() - contentComp->getHeight()), jmin (0, -(pos.y)))); } void Viewport::setViewPosition (const int xPixelsOffset, const int yPixelsOffset) @@ -227,7 +227,7 @@ void Viewport::updateVisibleArea() { horizontalScrollBar.setBounds (0, contentArea.getHeight(), contentArea.getWidth(), scrollbarWidth); horizontalScrollBar.setRangeLimits (0.0, contentBounds.getWidth()); - horizontalScrollBar.setCurrentRange (visibleOrigin.getX(), contentArea.getWidth()); + horizontalScrollBar.setCurrentRange (visibleOrigin.x, contentArea.getWidth()); horizontalScrollBar.setSingleStepSize (singleStepX); horizontalScrollBar.cancelPendingUpdate(); } @@ -240,7 +240,7 @@ void Viewport::updateVisibleArea() { verticalScrollBar.setBounds (contentArea.getWidth(), 0, scrollbarWidth, contentArea.getHeight()); verticalScrollBar.setRangeLimits (0.0, contentBounds.getHeight()); - verticalScrollBar.setCurrentRange (visibleOrigin.getY(), contentArea.getHeight()); + verticalScrollBar.setCurrentRange (visibleOrigin.y, contentArea.getHeight()); verticalScrollBar.setSingleStepSize (singleStepY); verticalScrollBar.cancelPendingUpdate(); } @@ -264,9 +264,9 @@ void Viewport::updateVisibleArea() } } - const Rectangle visibleArea (visibleOrigin.getX(), visibleOrigin.getY(), - jmin (contentBounds.getWidth() - visibleOrigin.getX(), contentArea.getWidth()), - jmin (contentBounds.getHeight() - visibleOrigin.getY(), contentArea.getHeight())); + const Rectangle visibleArea (visibleOrigin.x, visibleOrigin.y, + jmin (contentBounds.getWidth() - visibleOrigin.x, contentArea.getWidth()), + jmin (contentBounds.getHeight() - visibleOrigin.y, contentArea.getHeight())); if (lastVisibleArea != visibleArea) { @@ -369,19 +369,19 @@ bool Viewport::useMouseWheelMoveIfNeeded (const MouseEvent& e, float wheelIncrem if (wheelIncrementX != 0 && wheelIncrementY != 0 && hasHorzBar && hasVertBar) { - pos.setX (pos.getX() - roundToInt (wheelIncrementX)); - pos.setY (pos.getY() - roundToInt (wheelIncrementY)); + pos.setX (pos.x - roundToInt (wheelIncrementX)); + pos.setY (pos.y - roundToInt (wheelIncrementY)); } else if (hasHorzBar && (wheelIncrementX != 0 || e.mods.isShiftDown() || ! hasVertBar)) { if (wheelIncrementX == 0 && ! hasVertBar) wheelIncrementX = wheelIncrementY; - pos.setX (pos.getX() - roundToInt (wheelIncrementX)); + pos.setX (pos.x - roundToInt (wheelIncrementX)); } else if (hasVertBar && wheelIncrementY != 0) { - pos.setY (pos.getY() - roundToInt (wheelIncrementY)); + pos.setY (pos.y - roundToInt (wheelIncrementY)); } if (pos != getViewPosition()) diff --git a/modules/juce_gui_basics/menus/juce_MenuBarComponent.cpp b/modules/juce_gui_basics/menus/juce_MenuBarComponent.cpp index a1f660d565..ab2ac8facf 100644 --- a/modules/juce_gui_basics/menus/juce_MenuBarComponent.cpp +++ b/modules/juce_gui_basics/menus/juce_MenuBarComponent.cpp @@ -116,7 +116,7 @@ void MenuBarComponent::resized() int MenuBarComponent::getItemAt (const Point& p) { for (int i = 0; i < xPositions.size(); ++i) - if (p.getX() >= xPositions[i] && p.getX() < xPositions[i + 1]) + if (p.x >= xPositions[i] && p.x < xPositions[i + 1]) return reallyContains (p, true) ? i : -1; return -1; diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp index 6227e64856..6ac41f9c44 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp @@ -980,7 +980,7 @@ private: } Path areaTowardsSubMenu; - areaTowardsSubMenu.addTriangle ((float) lastMousePos.getX(), (float) lastMousePos.getY(), + areaTowardsSubMenu.addTriangle ((float) lastMousePos.x, (float) lastMousePos.y, subX, (float) activeSubMenu->getScreenY(), subX, (float) (activeSubMenu->getScreenY() + activeSubMenu->getHeight())); @@ -1100,12 +1100,12 @@ private: bool scrollIfNecessary (const Point& localMousePos, const uint32 timeNow) { if (canScroll() - && (isOver || (isDown && isPositiveAndBelow (localMousePos.getX(), getWidth())))) + && (isOver || (isDown && isPositiveAndBelow (localMousePos.x, getWidth())))) { - if (isTopScrollZoneActive() && localMousePos.getY() < PopupMenuSettings::scrollZone) + if (isTopScrollZoneActive() && localMousePos.y < PopupMenuSettings::scrollZone) return scroll (timeNow, -1); - if (isBottomScrollZoneActive() && localMousePos.getY() > getHeight() - PopupMenuSettings::scrollZone) + if (isBottomScrollZoneActive() && localMousePos.y > getHeight() - PopupMenuSettings::scrollZone) return scroll (timeNow, 1); } diff --git a/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp b/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp index afc9fd7a1b..7c25f66931 100644 --- a/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp +++ b/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp @@ -99,7 +99,7 @@ void BubbleComponent::setPosition (Component* componentToPointTo) else pos = componentToPointTo->localPointToGlobal (pos); - setPosition (Rectangle (pos.getX(), pos.getY(), componentToPointTo->getWidth(), componentToPointTo->getHeight())); + setPosition (Rectangle (pos.x, pos.y, componentToPointTo->getWidth(), componentToPointTo->getHeight())); } void BubbleComponent::setPosition (const int arrowTipX_, diff --git a/modules/juce_gui_basics/mouse/juce_MouseEvent.cpp b/modules/juce_gui_basics/mouse/juce_MouseEvent.cpp index 6ed8a618a4..57de466335 100644 --- a/modules/juce_gui_basics/mouse/juce_MouseEvent.cpp +++ b/modules/juce_gui_basics/mouse/juce_MouseEvent.cpp @@ -36,8 +36,8 @@ MouseEvent::MouseEvent (MouseInputSource& source_, const Time& mouseDownTime_, const int numberOfClicks_, const bool mouseWasDragged) noexcept - : x (position.getX()), - y (position.getY()), + : x (position.x), + y (position.y), mods (mods_), eventComponent (eventComponent_), originalComponent (originator), @@ -96,17 +96,17 @@ Point MouseEvent::getMouseDownScreenPosition() const { return eventCo Point MouseEvent::getOffsetFromDragStart() const noexcept { return getPosition() - mouseDownPos; } int MouseEvent::getDistanceFromDragStart() const noexcept { return mouseDownPos.getDistanceFrom (getPosition()); } -int MouseEvent::getMouseDownX() const noexcept { return mouseDownPos.getX(); } -int MouseEvent::getMouseDownY() const noexcept { return mouseDownPos.getY(); } +int MouseEvent::getMouseDownX() const noexcept { return mouseDownPos.x; } +int MouseEvent::getMouseDownY() const noexcept { return mouseDownPos.y; } -int MouseEvent::getDistanceFromDragStartX() const noexcept { return x - mouseDownPos.getX(); } -int MouseEvent::getDistanceFromDragStartY() const noexcept { return y - mouseDownPos.getY(); } +int MouseEvent::getDistanceFromDragStartX() const noexcept { return x - mouseDownPos.x; } +int MouseEvent::getDistanceFromDragStartY() const noexcept { return y - mouseDownPos.y; } -int MouseEvent::getScreenX() const { return getScreenPosition().getX(); } -int MouseEvent::getScreenY() const { return getScreenPosition().getY(); } +int MouseEvent::getScreenX() const { return getScreenPosition().x; } +int MouseEvent::getScreenY() const { return getScreenPosition().y; } -int MouseEvent::getMouseDownScreenX() const { return getMouseDownScreenPosition().getX(); } -int MouseEvent::getMouseDownScreenY() const { return getMouseDownScreenPosition().getY(); } +int MouseEvent::getMouseDownScreenX() const { return getMouseDownScreenPosition().x; } +int MouseEvent::getMouseDownScreenY() const { return getMouseDownScreenPosition().y; } //============================================================================== static int doubleClickTimeOutMs = 400; diff --git a/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp b/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp index 012f50645c..595ef29be6 100644 --- a/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp +++ b/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp @@ -459,8 +459,8 @@ private: bool canBePartOfMultipleClickWith (const RecentMouseDown& other, const int maxTimeBetweenMs) const { return time - other.time < RelativeTime::milliseconds (maxTimeBetweenMs) - && abs (position.getX() - other.position.getX()) < 8 - && abs (position.getY() - other.position.getY()) < 8 + && abs (position.x - other.position.x) < 8 + && abs (position.y - other.position.y) < 8 && buttons == other.buttons;; } }; diff --git a/modules/juce_gui_basics/native/juce_android_Windowing.cpp b/modules/juce_gui_basics/native/juce_android_Windowing.cpp index d3488aea4e..5e129cc033 100644 --- a/modules/juce_gui_basics/native/juce_android_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_android_Windowing.cpp @@ -276,10 +276,10 @@ public: bool contains (const Point& position, bool trueIfInAChildWindow) const { - return isPositiveAndBelow (position.getX(), component->getWidth()) - && isPositiveAndBelow (position.getY(), component->getHeight()) + return isPositiveAndBelow (position.x, component->getWidth()) + && isPositiveAndBelow (position.y, component->getHeight()) && ((! trueIfInAChildWindow) || view.callBooleanMethod (ComponentPeerView.containsPoint, - position.getX(), position.getY())); + position.x, position.y)); } const BorderSize getFrameSize() const diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index 89ff279e82..ea840662f9 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -738,15 +738,15 @@ public: bool contains (const Point& position, bool trueIfInAChildWindow) const { - if (! (isPositiveAndBelow (position.getX(), component->getWidth()) - && isPositiveAndBelow (position.getY(), component->getHeight()))) + if (! (isPositiveAndBelow (position.x, component->getWidth()) + && isPositiveAndBelow (position.y, component->getHeight()))) return false; RECT r; GetWindowRect (hwnd, &r); - POINT p = { position.getX() + r.left + windowBorder.getLeft(), - position.getY() + r.top + windowBorder.getTop() }; + POINT p = { position.x + r.left + windowBorder.getLeft(), + position.y + r.top + windowBorder.getTop() }; HWND w = WindowFromPoint (p); return w == hwnd || (trueIfInAChildWindow && (IsChild (hwnd, w) != 0)); @@ -1536,7 +1536,7 @@ private: // Because Windows stupidly sends all wheel events to the window with the keyboard // focus, we have to redirect them here according to the mouse pos.. - POINT p = { globalPos.getX(), globalPos.getY() }; + POINT p = { globalPos.x, globalPos.y }; HWNDComponentPeer* peer = getOwnerOfWindow (WindowFromPoint (p)); if (peer == nullptr) @@ -2847,7 +2847,7 @@ Point MouseInputSource::getCurrentMousePosition() void Desktop::setMousePosition (const Point& newPosition) { - SetCursorPos (newPosition.getX(), newPosition.getY()); + SetCursorPos (newPosition.x, newPosition.y); } //============================================================================== @@ -3026,7 +3026,7 @@ void Desktop::getCurrentMonitorPositions (Array >& monitorCoords screen.setPosition (jmax (screen.getX(), (int) r.left), jmax (screen.getY(), (int) r.top)); - screen.setSize (jmin (screen.getRight(), (int) r.right) - screen.getX(), + screen.setSize (jmin (screen.getRight(), (int) r.right) - screen.getX(), jmin (screen.getBottom(), (int) r.bottom) - screen.getY()); } } diff --git a/modules/juce_gui_basics/positioning/juce_RelativeParallelogram.cpp b/modules/juce_gui_basics/positioning/juce_RelativeParallelogram.cpp index 03f95b81ce..f975ebce86 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativeParallelogram.cpp +++ b/modules/juce_gui_basics/positioning/juce_RelativeParallelogram.cpp @@ -94,9 +94,9 @@ const AffineTransform RelativeParallelogram::resetToPerpendicular (Expression::S topRight.moveToAbsolute (newTopRight, scope); bottomLeft.moveToAbsolute (newBottomLeft, scope); - return AffineTransform::fromTargetPoints (corners[0].getX(), corners[0].getY(), corners[0].getX(), corners[0].getY(), - corners[1].getX(), corners[1].getY(), newTopRight.getX(), newTopRight.getY(), - corners[2].getX(), corners[2].getY(), newBottomLeft.getX(), newBottomLeft.getY()); + return AffineTransform::fromTargetPoints (corners[0].x, corners[0].y, corners[0].x, corners[0].y, + corners[1].x, corners[1].y, newTopRight.x, newTopRight.y, + corners[2].x, corners[2].y, newBottomLeft.x, newBottomLeft.y); } bool RelativeParallelogram::isDynamic() const @@ -127,8 +127,8 @@ const Point RelativeParallelogram::getInternalCoordForPoint (const Point< const Point RelativeParallelogram::getPointForInternalCoord (const Point* const corners, const Point& point) noexcept { return corners[0] - + Line (Point(), corners[1] - corners[0]).getPointAlongLine (point.getX()) - + Line (Point(), corners[2] - corners[0]).getPointAlongLine (point.getY()); + + Line (Point(), corners[1] - corners[0]).getPointAlongLine (point.x) + + Line (Point(), corners[2] - corners[0]).getPointAlongLine (point.y); } const Rectangle RelativeParallelogram::getBoundingBox (const Point* const p) noexcept diff --git a/modules/juce_gui_basics/positioning/juce_RelativePoint.cpp b/modules/juce_gui_basics/positioning/juce_RelativePoint.cpp index 282a5bed74..6202d4364a 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativePoint.cpp +++ b/modules/juce_gui_basics/positioning/juce_RelativePoint.cpp @@ -42,7 +42,7 @@ RelativePoint::RelativePoint() } RelativePoint::RelativePoint (const Point& absolutePoint) - : x (absolutePoint.getX()), y (absolutePoint.getY()) + : x (absolutePoint.x), y (absolutePoint.y) { } @@ -82,8 +82,8 @@ const Point RelativePoint::resolve (const Expression::Scope* scope) const void RelativePoint::moveToAbsolute (const Point& newPos, const Expression::Scope* scope) { - x.moveToAbsolute (newPos.getX(), scope); - y.moveToAbsolute (newPos.getY(), scope); + x.moveToAbsolute (newPos.x, scope); + y.moveToAbsolute (newPos.y, scope); } String RelativePoint::toString() const diff --git a/modules/juce_gui_basics/widgets/juce_Slider.cpp b/modules/juce_gui_basics/widgets/juce_Slider.cpp index 9aa7a693f9..7d9f26209c 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.cpp +++ b/modules/juce_gui_basics/widgets/juce_Slider.cpp @@ -1245,8 +1245,8 @@ void Slider::handleAbsoluteDrag (const MouseEvent& e) || style == LinearHorizontal || style == LinearBar || (style == IncDecButtons && incDecDragDirectionIsHorizontal())) - ? e.x - mouseDragStartPos.getX() - : mouseDragStartPos.getY() - e.y; + ? e.x - mouseDragStartPos.x + : mouseDragStartPos.y - e.y; double newPos = valueToProportionOfLength (valueOnMouseDown) + mouseDiff * (1.0 / pixelsForFullDragExtent); @@ -1272,8 +1272,8 @@ void Slider::handleVelocityDrag (const MouseEvent& e) { const int mouseDiff = (isHorizontal() || style == RotaryHorizontalDrag || (style == IncDecButtons && incDecDragDirectionIsHorizontal())) - ? e.x - mousePosWhenLastDragged.getX() - : e.y - mousePosWhenLastDragged.getY(); + ? e.x - mousePosWhenLastDragged.x + : e.y - mousePosWhenLastDragged.y; const double maxSpeed = jmax (200, sliderRegionSize); double speed = jlimit (0.0, maxSpeed, (double) abs (mouseDiff)); diff --git a/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp b/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp index 55d01b4198..e2a2f095d3 100644 --- a/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp @@ -89,13 +89,13 @@ void TooltipWindow::showFor (const String& tip) int w, h; getLookAndFeel().getTooltipSize (tip, w, h); - int x = mousePos.getX(); + int x = mousePos.x; if (x > parentArea.getCentreX()) x -= (w + 12); else x += 24; - int y = mousePos.getY(); + int y = mousePos.y; if (y > parentArea.getCentreY()) y -= (h + 6); else diff --git a/modules/juce_opengl/opengl/juce_OpenGLComponent.cpp b/modules/juce_opengl/opengl/juce_OpenGLComponent.cpp index 0d568e6994..454520821c 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLComponent.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLComponent.cpp @@ -381,7 +381,7 @@ void OpenGLComponent::paint (Graphics&) if (peer != nullptr) { const Point topLeft (getScreenPosition() - peer->getScreenPosition()); - peer->addMaskedRegion (topLeft.getX(), topLeft.getY(), getWidth(), getHeight()); + peer->addMaskedRegion (topLeft.x, topLeft.y, getWidth(), getHeight()); } } diff --git a/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp index 25ac2ad7cb..9034df75bc 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp @@ -75,7 +75,7 @@ struct OpenGLTarget } OpenGLTarget (OpenGLFrameBuffer& frameBuffer_, const Point& origin) noexcept - : frameBuffer (&frameBuffer_), frameBufferID (0), x (origin.getX()), y (origin.getY()), + : frameBuffer (&frameBuffer_), frameBufferID (0), x (origin.x), y (origin.y), width (frameBuffer_.getWidth()), height (frameBuffer_.getHeight()) {} @@ -529,12 +529,12 @@ namespace { const Point p1 (grad.point1.transformedBy (transform)); const Point p2 (grad.point2.transformedBy (transform)); - const Point p3 (Point (grad.point1.getX() - (grad.point2.getY() - grad.point1.getY()) / gradientTexture.textureSize, - grad.point1.getY() + (grad.point2.getX() - grad.point1.getX()) / gradientTexture.textureSize).transformedBy (transform)); + const Point p3 (Point (grad.point1.x - (grad.point2.y - grad.point1.y) / gradientTexture.textureSize, + grad.point1.y + (grad.point2.x - grad.point1.x) / gradientTexture.textureSize).transformedBy (transform)); - const AffineTransform textureTransform (AffineTransform::fromTargetPoints (p1.getX(), p1.getY(), 0.0f, 0.0f, - p2.getX(), p2.getY(), 1.0f, 0.0f, - p3.getX(), p3.getY(), 0.0f, 1.0f)); + const AffineTransform textureTransform (AffineTransform::fromTargetPoints (p1.x, p1.y, 0.0f, 0.0f, + p2.x, p2.y, 1.0f, 0.0f, + p3.x, p3.y, 0.0f, 1.0f)); const GLfloat l = (GLfloat) rect.getX(); const GLfloat r = (GLfloat) rect.getRight(); @@ -594,13 +594,13 @@ namespace { GLfloat* v = vertices; - *v++ = centre.getX(); - *v++ = centre.getY(); + *v++ = centre.x; + *v++ = centre.y; const Point first (grad.point1.translated (0, -sourceRadius) .transformedBy (transform)); - *v++ = first.getX(); - *v++ = first.getY(); + *v++ = first.x; + *v++ = first.y; for (int i = 1; i < numDivisions; ++i) { @@ -608,12 +608,12 @@ namespace const Point p (grad.point1.translated (std::sin (angle) * sourceRadius, std::cos (angle) * -sourceRadius) .transformedBy (transform)); - *v++ = p.getX(); - *v++ = p.getY(); + *v++ = p.x; + *v++ = p.y; } - *v++ = first.getX(); - *v++ = first.getY(); + *v++ = first.x; + *v++ = first.y; } prepareMasks (mask1, mask2, textureCoords2, textureCoords3, nullptr); @@ -765,7 +765,7 @@ public: Ptr applyClipTo (const Ptr& target) { - return target->clipToTexture (PositionedTexture (mask.getTextureID(), Rectangle (maskOrigin.getX(), maskOrigin.getY(), + return target->clipToTexture (PositionedTexture (mask.getTextureID(), Rectangle (maskOrigin.x, maskOrigin.y, mask.getWidth(), mask.getHeight()), clip)); } @@ -856,10 +856,10 @@ public: glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - const GLfloat l = (GLfloat) maskOrigin.getX(); - const GLfloat t = (GLfloat) maskOrigin.getY(); - const GLfloat r = (GLfloat) (maskOrigin.getX() + mask.getWidth()); - const GLfloat b = (GLfloat) (maskOrigin.getY() + mask.getHeight()); + const GLfloat l = (GLfloat) maskOrigin.x; + const GLfloat t = (GLfloat) maskOrigin.y; + const GLfloat r = (GLfloat) (maskOrigin.x + mask.getWidth()); + const GLfloat b = (GLfloat) (maskOrigin.y + mask.getHeight()); const GLfloat vertices[] = { l, t, r, t, l, b, r, b }; GLfloat textureCoords[] = { l, t, r, t, l, b, r, b }; @@ -890,13 +890,13 @@ public: void fillMask (const OpenGLTarget& target, const Rectangle& area, const PositionedTexture& texture, const FillType& fill, GradientTexture& gradientTexture) { - PositionedTexture pt (mask.getTextureID(), Rectangle (maskOrigin.getX(), maskOrigin.getY(), mask.getWidth(), mask.getHeight()), area); + PositionedTexture pt (mask.getTextureID(), Rectangle (maskOrigin.x, maskOrigin.y, mask.getWidth(), mask.getHeight()), area); fillTexture (target, area, fill, gradientTexture, &texture, &pt, false); } void fillRectInternal (const OpenGLTarget& target, const Rectangle& area, const FillType& fill, GradientTexture& gradientTexture, bool replaceContents) { - PositionedTexture pt (mask.getTextureID(), Rectangle (maskOrigin.getX(), maskOrigin.getY(), mask.getWidth(), mask.getHeight()), area); + PositionedTexture pt (mask.getTextureID(), Rectangle (maskOrigin.x, maskOrigin.y, mask.getWidth(), mask.getHeight()), area); fillTexture (target, area, fill, gradientTexture, &pt, nullptr, replaceContents); } @@ -907,7 +907,7 @@ public: if (! bufferArea.isEmpty()) { - PositionedTexture pt (mask.getTextureID(), Rectangle (maskOrigin.getX(), maskOrigin.getY(), mask.getWidth(), mask.getHeight()), bufferArea); + PositionedTexture pt (mask.getTextureID(), Rectangle (maskOrigin.x, maskOrigin.y, mask.getWidth(), mask.getHeight()), bufferArea); renderImage (target, source, bufferArea, transform, alpha, mask1, &pt, false, false); } } @@ -919,7 +919,7 @@ private: void prepareFor2D() const { - OpenGLTarget::applyFlippedMatrix (maskOrigin.getX(), maskOrigin.getY(), mask.getWidth(), mask.getHeight()); + OpenGLTarget::applyFlippedMatrix (maskOrigin.x, maskOrigin.y, mask.getWidth(), mask.getHeight()); } void makeMaskActive() @@ -942,7 +942,7 @@ private: void drawFrameBuffer (const OpenGLFrameBuffer& buffer, const Point& topLeft) { enableSingleTexture(); - OpenGLHelpers::drawTextureQuad (buffer.getTextureID(), Rectangle (topLeft.getX(), topLeft.getY(), + OpenGLHelpers::drawTextureQuad (buffer.getTextureID(), Rectangle (topLeft.x, topLeft.y, buffer.getWidth(), buffer.getHeight())); }