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

Major change to the way the Image class works, making it use value semantics and internally shared data (see the forum notes for more info on this). Also minor changes to win32 browser plugin object ref counting and linux millisecond timers.

This commit is contained in:
Julian Storer 2010-06-01 18:01:13 +01:00
parent 1baaa016bd
commit 24673283eb
121 changed files with 2763 additions and 2930 deletions

View file

@ -880,7 +880,7 @@ void ListBox::repaintRow (const int rowNumber) throw()
repaint (getRowPosition (rowNumber, true));
}
Image* ListBox::createSnapshotOfSelectedRows (int& imageX, int& imageY)
const Image ListBox::createSnapshotOfSelectedRows (int& imageX, int& imageY)
{
Rectangle<int> imageArea;
const int firstRow = getRowContainingPosition (0, 0);
@ -901,7 +901,7 @@ Image* ListBox::createSnapshotOfSelectedRows (int& imageX, int& imageY)
imageArea = imageArea.getIntersection (getLocalBounds());
imageX = imageArea.getX();
imageY = imageArea.getY();
Image* snapshot = Image::createNativeImage (Image::ARGB, imageArea.getWidth(), imageArea.getHeight(), true);
Image snapshot (Image::ARGB, imageArea.getWidth(), imageArea.getHeight(), true, Image::NativeImage);
for (i = getNumRowsOnScreen() + 2; --i >= 0;)
{
@ -911,7 +911,7 @@ Image* ListBox::createSnapshotOfSelectedRows (int& imageX, int& imageY)
{
const Point<int> pos (rowComp->relativePositionToOtherComponent (this, Point<int>()));
Graphics g (*snapshot);
Graphics g (snapshot);
g.setOrigin (pos.getX() - imageX, pos.getY() - imageY);
if (g.reduceClipRegion (0, 0, rowComp->getWidth(), rowComp->getHeight()))
rowComp->paintEntireComponent (g);
@ -929,8 +929,8 @@ void ListBox::startDragAndDrop (const MouseEvent& e, const String& dragDescripti
if (dragContainer != 0)
{
int x, y;
Image* dragImage = createSnapshotOfSelectedRows (x, y);
dragImage->multiplyAllAlphas (0.6f);
Image dragImage (createSnapshotOfSelectedRows (x, y));
dragImage.multiplyAllAlphas (0.6f);
MouseEvent e2 (e.getEventRelativeTo (this));
const Point<int> p (x - e2.x, y - e2.y);