In my app I have some animation on top of a circular dial image generated from some data, which I am writing to an Image object. The Image is the size of the Component. I am using getWidth() and getHeight() to set the size of the Image. However on rendering the Image looks like its around half the resolution, quite blocky and with out-of-phase anti-aliasing. I'm not sure what might be going wrong here.
Do I need to increase the Image size? Something to do with DPI ScaleFactor? This is not a retina device I'm testing on... (iPhone 4S)
BTW iPhone 4S is a retina device (they introduced this with the iPhone 4). You need to find the physical display scale in the paint method and match that i.e Graphics::getInternalContext().getPhysicalPixelScaleFactor().
As Jules mentions, take a look at StandardCachedComponentImage in Component.cpp for how to do this but as you mention it might be easier to use this for your caching rather than rolling your own.