2013年5月12日 星期日

[Graphic] Vector Drawables

Drawable 分為兩類:


Bitmap Drawables
  • Bitmap files, ex:
    • PNG which are rendered as images by the OS.
    • 9-patch bitmaps which enable the OS to anamorphically distort the image to fit a particular region.
Vector Drawables
  • Consist of XML files which contain some basic vector drawing command which the OS renders dynamically at runtime.
  • 缺點:
    • Require more processing power to render,particularly gradients; 
    • The drawing primitives are not as flexible as those in your favorite image manipulation software.


兩種差異是單一的 vector drawable 在不同顯示規格下的縮放表現較好(a single vector drawable will scale much better on a variety of different display types)。


* Reference
- Vector Drawables – part 1

沒有留言:

張貼留言