Vector Graphics or Bitmaps?


Vector graphics scale well, are reusable, and reduce production time, but they can render slowly. Bitmaps render quickly but do not scale well. Enhancement can be done in both areas.

Using vector graphics

Create your vector art at medium size and resize it on the fly based on the device’s resolution and PPI. Then use cacheAsBitmap or cacheAsBitmapMatrix based on the transformation applied to improve its rendering performance. If you want to apply a filter, draw it into a bitmap.

Using bitmaps

You can choose from several techniques when using bitmaps. For instance, you can create art at different resolutions and choose the right one for the device’s resolution. This guarantees fidelity, but at the cost of packaging extra assets. Alternatively, you can create the bitmap at the highest possible resolution and then scale it down if needed. Keep your art light so that you don’t waste too much bandwidth.