mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added begin()/end() iterators to RectangleList. You should use these in preference to RectangleList::Iterator, as they're faster.
This commit is contained in:
parent
0d4d67da40
commit
667a18712f
7 changed files with 65 additions and 60 deletions
|
|
@ -205,7 +205,7 @@ void LowLevelGraphicsPostScriptRenderer::writeClip()
|
|||
|
||||
int itemsOnLine = 0;
|
||||
|
||||
for (RectangleList::Iterator i (stateStack.getLast()->clip); i.next();)
|
||||
for (const Rectangle<int>* i = stateStack.getLast()->clip.begin(), * const e = stateStack.getLast()->clip.end(); i != e; ++i)
|
||||
{
|
||||
if (++itemsOnLine == 6)
|
||||
{
|
||||
|
|
@ -213,10 +213,8 @@ void LowLevelGraphicsPostScriptRenderer::writeClip()
|
|||
out << '\n';
|
||||
}
|
||||
|
||||
const Rectangle<int>& r = *i.getRectangle();
|
||||
|
||||
out << r.getX() << ' ' << -r.getY() << ' '
|
||||
<< r.getWidth() << ' ' << -r.getHeight() << " pr ";
|
||||
out << i->getX() << ' ' << -i->getY() << ' '
|
||||
<< i->getWidth() << ' ' << -i->getHeight() << " pr ";
|
||||
}
|
||||
|
||||
out << "endclip\n";
|
||||
|
|
@ -479,7 +477,7 @@ void LowLevelGraphicsPostScriptRenderer::drawImage (const Image& sourceImage, co
|
|||
out << "newpath ";
|
||||
int itemsOnLine = 0;
|
||||
|
||||
for (RectangleList::Iterator i (imageClip); i.next();)
|
||||
for (const Rectangle<int>* i = imageClip.begin(), * const e = imageClip.end(); i != e; ++i)
|
||||
{
|
||||
if (++itemsOnLine == 6)
|
||||
{
|
||||
|
|
@ -487,9 +485,7 @@ void LowLevelGraphicsPostScriptRenderer::drawImage (const Image& sourceImage, co
|
|||
itemsOnLine = 0;
|
||||
}
|
||||
|
||||
const Rectangle<int>& r = *i.getRectangle();
|
||||
|
||||
out << r.getX() << ' ' << r.getY() << ' ' << r.getWidth() << ' ' << r.getHeight() << " pr ";
|
||||
out << i->getX() << ' ' << i->getY() << ' ' << i->getWidth() << ' ' << i->getHeight() << " pr ";
|
||||
}
|
||||
|
||||
out << " clip newpath\n";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue