AndBase开发框架  1.5.7
 全部  命名空间 文件 函数 变量 枚举值 
静态 Public 成员函数 | 所有成员列表
com.ab.util.AbGraphical类 参考

静态 Public 成员函数

static int subStringLength (String str, int maxPix, TextPaint paint)
 
static float getStringWidth (String str, TextPaint paint)
 
static float getDesiredWidth (String str, TextPaint paint)
 
static List< String > getDrawRowStr (String text, int maxWPix, TextPaint paint)
 
static int getDrawRowCount (String text, int maxWPix, TextPaint paint)
 
static int drawText (Canvas canvas, String text, int maxWPix, TextPaint paint, int left, int top)
 

详细描述

描述:图形处理类.

作者
zhaoqp
日期
:2013-1-17 上午10:07:09
版本
v1.0

成员函数说明

static int com.ab.util.AbGraphical.drawText ( Canvas  canvas,
String  text,
int  maxWPix,
TextPaint  paint,
int  left,
int  top 
)
inlinestatic

描述:绘制文本,支持换行.

参数
canvasthe canvas
textthe text
maxWPixthe max w pix
paintthe paint
leftthe left
topthe top
返回
the int
static float com.ab.util.AbGraphical.getDesiredWidth ( String  str,
TextPaint  paint 
)
inlinestatic

Return how wide a layout must be in order to display the specified text with one line per paragraph.

参数
strthe str
paintthe paint
返回
the string width2
static int com.ab.util.AbGraphical.getDrawRowCount ( String  text,
int  maxWPix,
TextPaint  paint 
)
inlinestatic

Gets the draw row count.

参数
textthe text
maxWPixthe max w pix
paintthe paint
返回
the draw row count
static List<String> com.ab.util.AbGraphical.getDrawRowStr ( String  text,
int  maxWPix,
TextPaint  paint 
)
inlinestatic

Gets the draw row string.

参数
textthe text
maxWPixthe max w pix
paintthe paint
返回
the draw row count
static float com.ab.util.AbGraphical.getStringWidth ( String  str,
TextPaint  paint 
)
inlinestatic

描述:获取文字的像素宽.

参数
strthe str
paintthe paint
返回
the string width
static int com.ab.util.AbGraphical.subStringLength ( String  str,
int  maxPix,
TextPaint  paint 
)
inlinestatic

描述:获取字符的所在位置(按像素获取最大能容纳的).

参数
str指定的字符串
maxPix要取到的位置(像素)
paintthe paint
返回
字符的所在位置

该类的文档由以下文件生成: