diff --git a/modules/juce_graphics/contexts/juce_GraphicsContext.cpp b/modules/juce_graphics/contexts/juce_GraphicsContext.cpp index b0166b1929..71ea342c17 100644 --- a/modules/juce_graphics/contexts/juce_GraphicsContext.cpp +++ b/modules/juce_graphics/contexts/juce_GraphicsContext.cpp @@ -445,6 +445,11 @@ void Graphics::drawEllipse (float x, float y, float width, float height, float l strokePath (p, PathStrokeType (lineThickness)); } +void Graphics::drawEllipse (const Rectangle& area, float lineThickness) const +{ + drawEllipse (area.getX(), area.getY(), area.getWidth(), area.getHeight(), lineThickness); +} + void Graphics::fillRoundedRectangle (float x, float y, float width, float height, float cornerSize) const { fillRoundedRectangle (coordsToRectangle (x, y, width, height), cornerSize); diff --git a/modules/juce_graphics/contexts/juce_GraphicsContext.h b/modules/juce_graphics/contexts/juce_GraphicsContext.h index c7bf013c69..221cfcb5c6 100644 --- a/modules/juce_graphics/contexts/juce_GraphicsContext.h +++ b/modules/juce_graphics/contexts/juce_GraphicsContext.h @@ -352,6 +352,11 @@ public: void drawEllipse (float x, float y, float width, float height, float lineThickness) const; + /** Draws an elliptical stroke using the current colour or brush. + @see fillEllipse, Path::addEllipse + */ + void drawEllipse (const Rectangle& area, float lineThickness) const; + //============================================================================== /** Draws a line between two points. The line is 1 pixel wide and drawn with the current colour or brush.