When I have something like:
myDc = myBuffer.getDc(); myDc.setAntiAlias(true); myDc.fillPolygon(somePoints);
then antialiasing works as expected. But when I have:
myBuffer.getDc().setAntiAlias(true); myBuffer.getDc().fillPolygon(somePoints);
AntiAliasing doesn't happen. But, when I pass myBuffer.getDc() as an argument to a function:
function myDraw(mydc as Dc) { mydc.setAntiAlias(true); mydc.drawPolygon(somePoints); } myDraw(myBuffer.getDc());
Then antialiasing is working again. Is this by design, or a "feature"? I'm trying to save some memory because it seems that in the first example myDc is a copy and not a reference, so it can be 40K+ for a full screen bitmap. Is it possible to have myDc as a reference and not a copy without having to wrap everything in a function?