本文整理了Java中com.koolearn.klibrary.text.view.style.ZLTextNGStyleDescription.parseLength()
方法的一些代码示例,展示了ZLTextNGStyleDescription.parseLength()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZLTextNGStyleDescription.parseLength()
方法的具体详情如下:
包路径:com.koolearn.klibrary.text.view.style.ZLTextNGStyleDescription
类名称:ZLTextNGStyleDescription
方法名:parseLength
暂无
代码示例来源:origin: ydcx/KooReader
boolean hasNonZeroVerticalAlign() {
final ZLTextStyleEntry.Length length = parseLength(VerticalAlignOption.getValue());
return length != null && length.Size != 0;
}
代码示例来源:origin: Jiangzqts/EpubRead
boolean hasNonZeroVerticalAlign() {
final ZLTextStyleEntry.Length length = parseLength(VerticalAlignOption.getValue());
return length != null && length.Size != 0;
}
代码示例来源: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 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: 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: 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 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: 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
);
}
内容来源于网络,如有侵权,请联系作者删除!