Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2091316
  • 博文数量: 413
  • 博客积分: 10926
  • 博客等级: 上将
  • 技术积分: 3862
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-09 18:14
文章分类

全部博文(413)

文章存档

2015年(5)

2014年(1)

2013年(5)

2012年(6)

2011年(138)

2010年(85)

2009年(42)

2008年(46)

2007年(26)

2006年(59)

分类: LINUX

2010-09-09 17:51:39

  1. Docs
    • Drawable Resources
      http://developer.android.com/guide/topics/resources/drawable-resource.html
    • 2D Graphics
      http://developer.android.com/guide/topics/graphics/2d-graphics.html
    • Toll to Draw 9-patch Drawable
      http://developer.android.com/guide/developing/tools/draw9patch.html
    • xxx
  2. Packages
    • android.graphics
    • android.graphics.drawable
    • android.graphics.drawable.shapes
  3. 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:
        1. color/image/picture
        2. point/line/rect
        3. text
      • clip
        1. path
        2. rect
        3. region
      • xxx
    • Color
      • Color
        1. Contains pre-defined colors: GREEN, GRAY, xxx
        2. Return the alpha/red/green/blue component of a color int
        3. 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.
    • Point (PointF - for float coordinates)
    • Rect
    • ImageView
      • Set image
        Bitmap bmp = xxxx;
        ImageView imgView = xxx;
        imgView.setImageBitmap(bmp);
    • xxx
  4. xxx
阅读(1114) | 评论(0) | 转发(0) |
0

上一篇:[Vmware] 用法

下一篇:[Android] Preference

给主人留下些什么吧!~~