SafeGraphics

画笔

Author

空梦

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun drawDottedLine(char: Char, x: Int, y: Int, width: Int, height: Int, lineLength: Int, spaceLength: Int, offset: Int = 0)

以指定字符为填充绘制一条虚线

Link copied to clipboard
fun drawStringLine(text: String, x: Int, y: Int, maxWidth: Int, offsetX: Int = 0, attr: Int = -1): Int

打印一个不换行的字符串,超出范围的字符将被删除

Link copied to clipboard
fun drawStringRect(text: String, x: Int, y: Int, maxWidth: Int, maxHeight: Int, offsetY: Int = 0, attr: Int = -1): Int

打印一个换行的字符串,当字符串内容超过最大限制时会换行打印。

Link copied to clipboard
fun drawVerticalDottedLine(char: Char, x: Int, y: Int, width: Int, height: Int, lineLength: Int, spaceLength: Int, offset: Int = 0)

以指定字符填充一条竖直的虚线

Link copied to clipboard
fun fillRect(char: Char, x: Int, y: Int, width: Int, height: Int, attr: Int = -1)

以指定符号填充一个矩形

Link copied to clipboard
fun fillRectHallow(char: Char, x: Int, y: Int, width: Int, height: Int, attr: Int = -1)

以指定符号填充一个空心矩形

Link copied to clipboard
fun modifyRect(attr: Int, x: Int, y: Int, width: Int, height: Int)

修改一个矩形区域内的 attr

Properties

Link copied to clipboard
val height: Int

绘制区域高度

Link copied to clipboard
val index: Int

缓存下标

Link copied to clipboard
val width: Int

绘制区域宽度

Link copied to clipboard
val x: Int

画笔在画布中的 X 轴坐标

Link copied to clipboard
val y: Int

画笔在画布中的 Y 轴坐标