gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-13 11:58:56 28 4
gpt4 key购买 nike

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

ZLTextStyleEntry.getLength介绍

暂无

代码示例

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

@Override
protected int getSpaceBeforeInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getSpaceBefore(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_SPACE_BEFORE)) {
    return Parent.getSpaceBefore(metrics);
  }
  return myEntry.getLength(LENGTH_SPACE_BEFORE, metrics, fontSize);
}
@Override

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

@Override
protected int getFirstLineIndentInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getFirstLineIndent(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_FIRST_LINE_INDENT)) {
    return Parent.getFirstLineIndent(metrics);
  }
  return myEntry.getLength(LENGTH_FIRST_LINE_INDENT, metrics, fontSize);
}
@Override

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

@Override
protected int getSpaceAfterInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getSpaceAfter(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_SPACE_AFTER)) {
    return Parent.getSpaceAfter(metrics);
  }
  return myEntry.getLength(LENGTH_SPACE_AFTER, metrics, fontSize);
}
public byte getAlignment() {

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

@Override
protected int getFirstLineIndentInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getFirstLineIndent(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_FIRST_LINE_INDENT)) {
    return Parent.getFirstLineIndent(metrics);
  }
  return myEntry.getLength(LENGTH_FIRST_LINE_INDENT, metrics, fontSize);
}
@Override

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

@Override
protected int getSpaceAfterInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getSpaceAfter(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_SPACE_AFTER)) {
    return Parent.getSpaceAfter(metrics);
  }
  return myEntry.getLength(LENGTH_SPACE_AFTER, metrics, fontSize);
}
public byte getAlignment() {

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

@Override
protected int getSpaceBeforeInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getSpaceBefore(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_SPACE_BEFORE)) {
    return Parent.getSpaceBefore(metrics);
  }
  return myEntry.getLength(LENGTH_SPACE_BEFORE, metrics, fontSize);
}
@Override

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

@Override
public int getLeftPaddingInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getLeftPadding(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_PADDING_LEFT)) {
    return Parent.getLeftPadding(metrics);
  }
  return getTreeParent().getLeftPadding(metrics) + myEntry.getLength(LENGTH_PADDING_LEFT, metrics, fontSize);
}
@Override

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

@Override
public int getRightMarginInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getRightMargin(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_MARGIN_RIGHT)) {
    return Parent.getRightMargin(metrics);
  }
  return getTreeParent().getRightMargin(metrics) + myEntry.getLength(LENGTH_MARGIN_RIGHT, metrics, fontSize);
}
@Override

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

@Override
public int getRightPaddingInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getRightPadding(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_PADDING_RIGHT)) {
    return Parent.getRightPadding(metrics);
  }
  return getTreeParent().getRightPadding(metrics) + myEntry.getLength(LENGTH_PADDING_RIGHT, metrics, fontSize);
}
@Override

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

@Override
public int getLeftMarginInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getLeftMargin(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_MARGIN_LEFT)) {
    return Parent.getLeftMargin(metrics);
  }
  return getTreeParent().getLeftMargin(metrics) + myEntry.getLength(LENGTH_MARGIN_LEFT, metrics, fontSize);
}
@Override

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

@Override
public int getLeftPaddingInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getLeftPadding(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_PADDING_LEFT)) {
    return Parent.getLeftPadding(metrics);
  }
  return getTreeParent().getLeftPadding(metrics) + myEntry.getLength(LENGTH_PADDING_LEFT, metrics, fontSize);
}
@Override

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

@Override
public int getRightMarginInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getRightMargin(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_MARGIN_RIGHT)) {
    return Parent.getRightMargin(metrics);
  }
  return getTreeParent().getRightMargin(metrics) + myEntry.getLength(LENGTH_MARGIN_RIGHT, metrics, fontSize);
}
@Override

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

@Override
public int getLeftMarginInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getLeftMargin(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_MARGIN_LEFT)) {
    return Parent.getLeftMargin(metrics);
  }
  return getTreeParent().getLeftMargin(metrics) + myEntry.getLength(LENGTH_MARGIN_LEFT, metrics, fontSize);
}
@Override

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

@Override
public int getRightPaddingInternal(ZLTextMetrics metrics, int fontSize) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSMarginsOption.getValue()) {
    return Parent.getRightPadding(metrics);
  }
  if (!myEntry.isFeatureSupported(LENGTH_PADDING_RIGHT)) {
    return Parent.getRightPadding(metrics);
  }
  return getTreeParent().getRightPadding(metrics) + myEntry.getLength(LENGTH_PADDING_RIGHT, metrics, fontSize);
}
@Override

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

@Override
protected int getFontSizeInternal(ZLTextMetrics metrics) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSFontSizeOption.getValue()) {
    return Parent.getFontSize(metrics);
  }
  final int baseFontSize = getTreeParent().getFontSize(metrics);
  if (myEntry.isFeatureSupported(FONT_STYLE_MODIFIER)) {
    if (myEntry.getFontModifier(FONT_MODIFIER_INHERIT) == Boolean3.TRUE) {
      return baseFontSize;
    }
    if (myEntry.getFontModifier(FONT_MODIFIER_LARGER) == Boolean3.TRUE) {
      return baseFontSize * 120 / 100;
    }
    if (myEntry.getFontModifier(FONT_MODIFIER_SMALLER) == Boolean3.TRUE) {
      return baseFontSize * 100 / 120;
    }
  }
  if (myEntry.isFeatureSupported(LENGTH_FONT_SIZE)) {
    return myEntry.getLength(LENGTH_FONT_SIZE, metrics, baseFontSize);
  }
  return Parent.getFontSize(metrics);
}

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

@Override
protected int getFontSizeInternal(ZLTextMetrics metrics) {
  if (myEntry instanceof ZLTextCSSStyleEntry && !BaseStyle.UseCSSFontSizeOption.getValue()) {
    return Parent.getFontSize(metrics);
  }
  final int baseFontSize = getTreeParent().getFontSize(metrics);
  if (myEntry.isFeatureSupported(FONT_STYLE_MODIFIER)) {
    if (myEntry.getFontModifier(FONT_MODIFIER_INHERIT) == Boolean3.TRUE) {
      return baseFontSize;
    }
    if (myEntry.getFontModifier(FONT_MODIFIER_LARGER) == Boolean3.TRUE) {
      return baseFontSize * 120 / 100;
    }
    if (myEntry.getFontModifier(FONT_MODIFIER_SMALLER) == Boolean3.TRUE) {
      return baseFontSize * 100 / 120;
    }
  }
  if (myEntry.isFeatureSupported(LENGTH_FONT_SIZE)) {
    return myEntry.getLength(LENGTH_FONT_SIZE, metrics, baseFontSize);
  }
  return Parent.getFontSize(metrics);
}

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

return myEntry.getLength(LENGTH_VERTICAL_ALIGN, metrics, fontSize);
} else if (myEntry.isFeatureSupported(NON_LENGTH_VERTICAL_ALIGN)) {
  switch (myEntry.getVerticalAlignCode()) {

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

return myEntry.getLength(LENGTH_VERTICAL_ALIGN, metrics, fontSize);
} else if (myEntry.isFeatureSupported(NON_LENGTH_VERTICAL_ALIGN)) {
  switch (myEntry.getVerticalAlignCode()) {

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