Toll to Draw 9-patch Drawable http://developer.android.com/guide/developing/tools/draw9patch.html
xxx
Packages
android.graphics
android.graphics.drawable
android.graphics.drawable.shapes
Classes
Drawable A Drawable is a general abstraction for "something that can be drawn.". Unlike a View, a Drawable does not have any facility to receive events or otherwise interact with the user. Drawables may take a variety
of forms:
Bitmap
Nine Patch
Shape
Layers
States
Levels
Scale
Some sub-classes
ColorDrawable A specialized Drawable that fills the Canvas with a specified color.
ClipDrawable A Drawable that clips another Drawable based on this Drawable's current
level value.
BitmapDrawable A Drawable that wraps a bitmap and can be tiled, stretched, or aligned.
AnimationDrawable An object used to create frame-by-frame animations, defined by a series of Drawable objects, which can be used as a View object's background.
ShapeDrawable Use Shape: such as ArcShape, RectShape, RoundRectShape, PathShape, OvalShape.
......
xxx
xxx
Bitmap
Get attributes of Bitmap
Create Bitmap
Clip Bitmap
xxx
BitmapFactory Creates Bitmap objects from various sources, including files, streams, and byte-arrays. ie: Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.xxx);
BitmapRegionDecoder Decode a rectangle region from an image.
BitmapRegionDecoder is particularly useful when an original image is large and
you only need parts of the image.
NinePatch A NinePatch drawable is a standard PNG
image that includes an extra 1-pixel-wide border, the border is used to define the stretchable and static areas of
the image. Draw a bitmap in nine sections (9-Patch).
Camera Used to compute 3D transformations: rotate, move, translate.
Movie
Load Move from file, input stream, byte array
Draw movie on Canvas
Get arrtibutes
Paint The Paint class holds the style and color information about how to draw
geometries, text and bitmaps on Canvas.
Canvas The Canvas class holds the "draw" calls. To draw something, you need
4 basic components: A Bitmap to hold the pixels, a Canvas to host
the draw calls (writing into the bitmap), a drawing primitive (e.g. Rect,
Path, text, Bitmap), and a paint (to describe the colors and styles for the
drawing).
get/set attributes
scale/rotate/translate
draw:
color/image/picture
point/line/rect
text
clip
path
rect
region
xxx
Color
Color
Contains pre-defined colors: GREEN, GRAY, xxx
Return the alpha/red/green/blue component of a color int
Return a color-int from alpha, red, green, blue components.
ColorMatrix 5x4 matrix for transforming the color+alpha components.
The matrix is stored in a single array.
Used by: Paint <- ColorFilter <- ColorMatrixFilter <- ColorMatrix
xxx
Path The Path class encapsulates compound (multiple contour) geometric paths
consisting of straight line segments, quadratic curves, and cubic curves.
It can be drawn with canvas.drawPath(path, paint), either filled or stroked
(based on the paint's Style), or it can be used for clipping or to draw
text on a path.