1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-03 03:30:06 +00:00

New arrowhead and polygon methods for Path and PathStrokeType. Tweaked a few Path methods to take Line and Point objects instead of loose coordinate parameters. Various new geometric methods and more refactoring of Drawables. Misc fixes for CoreGraphics, AudioFormat.

This commit is contained in:
Julian Storer 2010-06-08 10:39:46 +01:00
parent 81d87a9a83
commit 00b082caf6
36 changed files with 1587 additions and 1225 deletions

View file

@ -473,12 +473,10 @@ void Graphics::drawRoundedRectangle (const Rectangle<float>& r, const float corn
drawRoundedRectangle (r.getX(), r.getY(), r.getWidth(), r.getHeight(), cornerSize, lineThickness);
}
void Graphics::drawArrow (const float startX, const float startY, const float endX, const float endY,
const float lineThickness, const float arrowheadWidth, const float arrowheadLength) const
void Graphics::drawArrow (const Line<float>& line, const float lineThickness, const float arrowheadWidth, const float arrowheadLength) const
{
Path p;
p.addArrow (startX, startY, endX, endY,
lineThickness, arrowheadWidth, arrowheadLength);
p.addArrow (line, lineThickness, arrowheadWidth, arrowheadLength);
fillPath (p);
}
@ -545,9 +543,7 @@ void Graphics::drawLine (const float startX, const float startY,
const float endX, const float endY,
const float lineThickness) const
{
Path p;
p.addLineSegment (startX, startY, endX, endY, lineThickness);
fillPath (p);
drawLine (Line<float> (startX, startY, endX, endY),lineThickness);
}
void Graphics::drawLine (const Line<float>& line) const
@ -557,7 +553,9 @@ void Graphics::drawLine (const Line<float>& line) const
void Graphics::drawLine (const Line<float>& line, const float lineThickness) const
{
drawLine (line.getStartX(), line.getStartY(), line.getEndX(), line.getEndY(), lineThickness);
Path p;
p.addLineSegment (line, lineThickness);
fillPath (p);
}
void Graphics::drawDashedLine (const float startX, const float startY,