Hey all -
I think I am not understanding something about how colours get resampled when an image is rescaled.
I have 2 images, both ARGB and cleared.
In the image below I am drawing a green circle on one image and then copy that image to the second image while applying an Affinetransform (rescaling), then copying it back (for feedback).
This is the standard way to do this sort of recursive drawing (think, winamp visualization, etc).
Anyway, I can’t figure out why I’m getting any black in there … I know that it does some resampling / antialiasing … which (I would think) would mean that some pixels start to fade away, as opposed to darkening.
Graphics instGraphic1(outlineCanvas);
Graphics instGraphic2(outlineCanvasTransformed);
// periodically draw a green circle
if (circle%70 == 0)
{
instGraphic1.setColour(Colours::green);
instGraphic1.drawEllipse(100, 100, 200, 200, 5);
circle = 0;
}
circle++;
// feedback ->
instGraphic2.drawImageTransformed(outlineCanvas, AffineTransform::scale(1.01, 1.01, 200, 200));
instGraphic1.drawImageAt(outlineCanvasTransformed, 0, 0);
g.drawImageAt(outlineCanvas, 0, 0);