android canvas drawText 使用说明
来源:互联网 发布:js格式视频 编辑:程序博客网 时间:2024/04/30 20:05
public void drawText(String text, float x, float y,Paint paint)
Parameters:
text The text to be drawn //要绘制的文本
x The x-coordinate of the origin of the text being drawn //要绘制文本起始点的x坐标
y The y-coordinate of the origin of the text being drawn //要绘制文本起始点的y坐标
paint The paint used for the text (e.g. color, size, style) //画笔
这里要特别说明的一点是:origin,起始点指的是从该点右上区域开始绘制文本,也就是绘制文本区域的左下角的点。
Paint.FontMetrics
Fields
如下属性主要表示画笔绘制区域内文本与边框的距离:
public float ascent The recommended distance above the baseline for singled spaced text. //某个文本基线往上的距离(为负数)
public float bottom The maximum distance below the baseline for the lowest glyph in the font at a given text size. //以一行文本最靠下的位置为基线往下的距离
public float descent The recommended distance below the baseline for singled spaced text. //某个文本基线往下的距离
public float leading The recommended additional space to add between lines of text. //行与行之间距
public float top The maximum distance above the baseline for the tallest glyph in the font at a given text size. //以一行文本最靠上的位置为基线往上的距离(为负数)
- android canvas drawText 使用说明
- Android-Canvas.drawText()详解
- Android: 关于Canvas.drawText
- Android中的canvas.drawText方法
- android canvas.drawText()的研究
- android canvas drawText()文字居中
- Android Canvas drawText()文字居中
- android canvas.drawText()的研究
- Android Canvas.drawText(...)自动换行
- android canvas drawText()文字居中
- Canvas drawText
- Canvas---drawText()
- canvas.drawText
- Android Canvas DrawText中文乱码问题。
- Android Canvas drawText实现中文垂直居中
- android canvas drawText \r\n 换行
- Android Canvas drawText实现中文垂直居中
- Android Canvas drawText实现中文垂直居中
- 第五章 习题(一)
- 深入理解JVM—性能调优
- Socket通讯工具类【SocketTools】
- A - War
- 获取相机、麦克风、通讯录权限,确认是否拥有这些权限
- android canvas drawText 使用说明
- Xdebug 配置 php 调试器
- stringstream的用法
- Windows Server 2003 共享文件夹权限设置
- App Icons on iPad and iPhone
- ListView中的手势问题
- JSONObject与JSONArray的使用
- java学习笔记1--数组初始化时的内存分配
- F7 - Full Featured HTML Framework For Building iOS7 Apps(Framework7开源轻量级HTML框架)