1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Removed the Image::setPixelData method - this can be done with Image::BitmapData instead. OSX file chooser options change for aliased files.

This commit is contained in:
Julian Storer 2011-09-19 12:30:43 +01:00
parent 149f94f9fc
commit 098400ef31
5 changed files with 7 additions and 29 deletions

View file

@ -334,24 +334,6 @@ void Image::BitmapData::setPixelColour (const int x, const int y, const Colour&
}
}
void Image::setPixelData (int x, int y, int w, int h,
const uint8* const sourcePixelData, const int sourceLineStride)
{
jassert (x >= 0 && y >= 0 && w > 0 && h > 0 && x + w <= getWidth() && y + h <= getHeight());
if (Rectangle<int>::intersectRectangles (x, y, w, h, 0, 0, getWidth(), getHeight()))
{
const BitmapData dest (*this, x, y, w, h, BitmapData::writeOnly);
for (int i = 0; i < h; ++i)
{
memcpy (dest.getLinePointer(i),
sourcePixelData + sourceLineStride * i,
(size_t) (w * dest.pixelStride));
}
}
}
//==============================================================================
void Image::clear (const Rectangle<int>& area, const Colour& colourToClearTo)
{

View file

@ -352,14 +352,7 @@ public:
JUCE_DECLARE_NON_COPYABLE (BitmapData);
};
/** Copies some pixel values to a rectangle of the image.
The format of the pixel data must match that of the image itself, and the
rectangle supplied must be within the image's bounds.
*/
void setPixelData (int destX, int destY, int destW, int destH,
const uint8* sourcePixelData, int sourceLineStride);
//==============================================================================
/** Copies a section of the image to somewhere else within itself. */
void moveImageSection (int destX, int destY,
int sourceX, int sourceY,