com.koolearn.klibrary.text.view.ZLTextViewBase.drawString()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(84)

本文整理了Java中com.koolearn.klibrary.text.view.ZLTextViewBase.drawString()方法的一些代码示例,展示了ZLTextViewBase.drawString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZLTextViewBase.drawString()方法的具体详情如下:
包路径:com.koolearn.klibrary.text.view.ZLTextViewBase
类名称:ZLTextViewBase
方法名:drawString

ZLTextViewBase.drawString介绍

暂无

代码示例

代码示例来源:origin: Jiangzqts/EpubRead

final void drawWord(int x, int y, ZLTextWord word, int start, int length, boolean addHyphenationSign, ZLColor color) {
  final ZLPaintContext context = getContext();
  if (start == 0 && length == -1) {
    drawString(context, x, y, word.Data, word.Offset, word.Length, word.getMark(), color, 0);
  } else {
    LogUtil.i10("drawWord");
    if (length == -1) {
      length = word.Length - start;
    }
    if (!addHyphenationSign) {
      drawString(context, x, y, word.Data, word.Offset + start, length, word.getMark(), color, start);
    } else {
      char[] part = myWordPartArray;
      if (length + 1 > part.length) {
        part = new char[length + 1];
        myWordPartArray = part;
      }
      System.arraycopy(word.Data, word.Offset + start, part, 0, length);
      part[length] = '-';
      drawString(context, x, y, part, 0, length + 1, word.getMark(), color, start);
    }
  }
}

代码示例来源:origin: ydcx/KooReader

final void drawWord(int x, int y, ZLTextWord word, int start, int length, boolean addHyphenationSign, ZLColor color) {
  final ZLPaintContext context = getContext();
  if (start == 0 && length == -1) {
    drawString(context, x, y, word.Data, word.Offset, word.Length, word.getMark(), color, 0);
  } else {
    LogUtil.i10("drawWord");
    if (length == -1) {
      length = word.Length - start;
    }
    if (!addHyphenationSign) {
      drawString(context, x, y, word.Data, word.Offset + start, length, word.getMark(), color, start);
    } else {
      char[] part = myWordPartArray;
      if (length + 1 > part.length) {
        part = new char[length + 1];
        myWordPartArray = part;
      }
      System.arraycopy(word.Data, word.Offset + start, part, 0, length);
      part[length] = '-';
      drawString(context, x, y, part, 0, length + 1, word.getMark(), color, start);
    }
  }
}

相关文章