twaver.network
Interface IImage


public interface IImage

图形数据接口,默认支持栅格图片,gif动画,以及任意Drawable实现类,比如NinePatchDrawable 可用于ImageUI的数据源

See Also:
ImageUI, Utils.registerImage(String, IImage)

Method Summary
 void draw(Canvas canvas, Paint paint, float width, float height)
          绘制图片
 void drawSelection(Canvas canvas, Paint paint, float width, float height, float radius, int selectionColor)
          绘制图片选中效果
 float getHeight()
          获取图片高度
 float getWidth()
          获取图片宽度
 boolean intersect(Point point, float width, float height)
          判断坐标点是否与图片相交
 

Method Detail

draw

void draw(Canvas canvas,
          Paint paint,
          float width,
          float height)
绘制图片

Parameters:
canvas -
paint -
width -
height -

drawSelection

void drawSelection(Canvas canvas,
                   Paint paint,
                   float width,
                   float height,
                   float radius,
                   int selectionColor)
绘制图片选中效果

Parameters:
canvas -
paint -
width -
height -
radius -
selectionColor -

getWidth

float getWidth()
获取图片宽度

Returns:
图片宽度

getHeight

float getHeight()
获取图片高度

Returns:
图片高度

intersect

boolean intersect(Point point,
                  float width,
                  float height)
判断坐标点是否与图片相交

Parameters:
point -
width -
height -
Returns:
坐标点是否与图片相交