gpt4 book ai didi

com.koolearn.klibrary.text.model.ZLTextStyleEntry.compute()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 12:02:23 26 4
gpt4 key购买 nike

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

ZLTextStyleEntry.compute介绍

暂无

代码示例

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

public final int getLength(int featureId, ZLTextMetrics metrics, int fontSize) {
  return compute(myLengths[featureId], metrics, fontSize, featureId);
}

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

public final int getLength(int featureId, ZLTextMetrics metrics, int fontSize) {
  return compute(myLengths[featureId], metrics, fontSize, featureId);
}

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

int getSpaceBefore(ZLTextMetrics metrics, int base, int fontSize) {
  final ZLTextStyleEntry.Length length = parseLength(MarginTopOption.getValue());
  if (length == null) {
    return base;
  }
  return ZLTextStyleEntry.compute(
    length, metrics, fontSize, ZLTextStyleEntry.Feature.LENGTH_SPACE_BEFORE
  );
}

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

int getSpaceBefore(ZLTextMetrics metrics, int base, int fontSize) {
  final ZLTextStyleEntry.Length length = parseLength(MarginTopOption.getValue());
  if (length == null) {
    return base;
  }
  return ZLTextStyleEntry.compute(
    length, metrics, fontSize, ZLTextStyleEntry.Feature.LENGTH_SPACE_BEFORE
  );
}

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

int getVerticalAlign(ZLTextMetrics metrics, int base, int fontSize) {
  final ZLTextStyleEntry.Length length = parseLength(VerticalAlignOption.getValue());
  if (length == null) {
    return base;
  }
  return ZLTextStyleEntry.compute(
    // TODO: add new length for vertical alignment
    length, metrics, fontSize, ZLTextStyleEntry.Feature.LENGTH_FONT_SIZE
  );
}

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

int getVerticalAlign(ZLTextMetrics metrics, int base, int fontSize) {
  final ZLTextStyleEntry.Length length = parseLength(VerticalAlignOption.getValue());
  if (length == null) {
    return base;
  }
  return ZLTextStyleEntry.compute(
    // TODO: add new length for vertical alignment
    length, metrics, fontSize, ZLTextStyleEntry.Feature.LENGTH_FONT_SIZE
  );
}

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

int getFirstLineIndent(ZLTextMetrics metrics, int base, int fontSize) {
  final ZLTextStyleEntry.Length length = parseLength(TextIndentOption.getValue());
  if (length == null) {
    return base;
  }
  return ZLTextStyleEntry.compute(
    length, metrics, fontSize, ZLTextStyleEntry.Feature.LENGTH_FIRST_LINE_INDENT
  );
}

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

int getLeftMargin(ZLTextMetrics metrics, int base, int fontSize) {
  final ZLTextStyleEntry.Length length = parseLength(MarginLeftOption.getValue());
  if (length == null) {
    return base;
  }
  return base + ZLTextStyleEntry.compute(
    length, metrics, fontSize, ZLTextStyleEntry.Feature.LENGTH_MARGIN_LEFT
  );
}

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

int getFirstLineIndent(ZLTextMetrics metrics, int base, int fontSize) {
  final ZLTextStyleEntry.Length length = parseLength(TextIndentOption.getValue());
  if (length == null) {
    return base;
  }
  return ZLTextStyleEntry.compute(
    length, metrics, fontSize, ZLTextStyleEntry.Feature.LENGTH_FIRST_LINE_INDENT
  );
}

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

int getSpaceAfter(ZLTextMetrics metrics, int base, int fontSize) {
  final ZLTextStyleEntry.Length length = parseLength(MarginBottomOption.getValue());
  if (length == null) {
    return base;
  }
  return ZLTextStyleEntry.compute(
    length, metrics, fontSize, ZLTextStyleEntry.Feature.LENGTH_SPACE_AFTER
  );
}

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

int getLeftMargin(ZLTextMetrics metrics, int base, int fontSize) {
  final ZLTextStyleEntry.Length length = parseLength(MarginLeftOption.getValue());
  if (length == null) {
    return base;
  }
  return base + ZLTextStyleEntry.compute(
    length, metrics, fontSize, ZLTextStyleEntry.Feature.LENGTH_MARGIN_LEFT
  );
}

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

int getRightMargin(ZLTextMetrics metrics, int base, int fontSize) {
  final ZLTextStyleEntry.Length length = parseLength(MarginRightOption.getValue());
  if (length == null) {
    return base;
  }
  return base + ZLTextStyleEntry.compute(
    length, metrics, fontSize, ZLTextStyleEntry.Feature.LENGTH_MARGIN_RIGHT
  );
}

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

int getFontSize(ZLTextMetrics metrics, int parentFontSize) {
  final ZLTextStyleEntry.Length length = parseLength(FontSizeOption.getValue());
  if (length == null) {
    return parentFontSize;
  }
  return ZLTextStyleEntry.compute(
    length, metrics, parentFontSize, ZLTextStyleEntry.Feature.LENGTH_FONT_SIZE
  );
}

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

int getRightMargin(ZLTextMetrics metrics, int base, int fontSize) {
  final ZLTextStyleEntry.Length length = parseLength(MarginRightOption.getValue());
  if (length == null) {
    return base;
  }
  return base + ZLTextStyleEntry.compute(
    length, metrics, fontSize, ZLTextStyleEntry.Feature.LENGTH_MARGIN_RIGHT
  );
}

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

int getFontSize(ZLTextMetrics metrics, int parentFontSize) {
  final ZLTextStyleEntry.Length length = parseLength(FontSizeOption.getValue());
  if (length == null) {
    return parentFontSize;
  }
  return ZLTextStyleEntry.compute(
    length, metrics, parentFontSize, ZLTextStyleEntry.Feature.LENGTH_FONT_SIZE
  );
}

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

int getSpaceAfter(ZLTextMetrics metrics, int base, int fontSize) {
  final ZLTextStyleEntry.Length length = parseLength(MarginBottomOption.getValue());
  if (length == null) {
    return base;
  }
  return ZLTextStyleEntry.compute(
    length, metrics, fontSize, ZLTextStyleEntry.Feature.LENGTH_SPACE_AFTER
  );
}

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

return Parent.getVerticalAlign(metrics);
case 0: // sub
  return ZLTextStyleEntry.compute(
    new ZLTextStyleEntry.Length((short)-50, ZLTextStyleEntry.SizeUnit.EM_100),
    metrics, fontSize, LENGTH_VERTICAL_ALIGN
  );
case 1: // super
  return ZLTextStyleEntry.compute(
    new ZLTextStyleEntry.Length((short)50, ZLTextStyleEntry.SizeUnit.EM_100),
    metrics, fontSize, LENGTH_VERTICAL_ALIGN

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

return Parent.getVerticalAlign(metrics);
case 0: // sub
  return ZLTextStyleEntry.compute(
    new ZLTextStyleEntry.Length((short)-50, ZLTextStyleEntry.SizeUnit.EM_100),
    metrics, fontSize, LENGTH_VERTICAL_ALIGN
  );
case 1: // super
  return ZLTextStyleEntry.compute(
    new ZLTextStyleEntry.Length((short)50, ZLTextStyleEntry.SizeUnit.EM_100),
    metrics, fontSize, LENGTH_VERTICAL_ALIGN

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com