protected float getLineHeight(BridgeContext ctx, Element element, float fontSize) { if (lineHeightIndex == -1) initCSSPropertyIndexes(element); Value v = CSSUtilities.getComputedStyle(element, lineHeightIndex); if ((v == ValueConstants.INHERIT_VALUE) || (v == SVG12ValueConstants.NORMAL_VALUE)) { return fontSize*1.1f; } float lineHeight = v.getFloatValue(); if (v instanceof ComputedValue) v = ((ComputedValue)v).getComputedValue(); if ((v instanceof LineHeightValue) && ((LineHeightValue)v).getFontSizeRelative()) lineHeight *= fontSize; return lineHeight; }
protected float getLineHeight(BridgeContext ctx, Element element, float fontSize) { if (lineHeightIndex == -1) initCSSPropertyIndexes(element); Value v = CSSUtilities.getComputedStyle(element, lineHeightIndex); if ((v == ValueConstants.INHERIT_VALUE) || (v == SVG12ValueConstants.NORMAL_VALUE)) { return fontSize*1.1f; } float lineHeight = v.getFloatValue(); if (v instanceof ComputedValue) v = ((ComputedValue)v).getComputedValue(); if ((v instanceof LineHeightValue) && ((LineHeightValue)v).getFontSizeRelative()) lineHeight *= fontSize; return lineHeight; }
protected float getLineHeight(BridgeContext ctx, Element element, float fontSize) { if (lineHeightIndex == -1) initCSSPropertyIndexes(element); Value v = CSSUtilities.getComputedStyle(element, lineHeightIndex); if ((v == ValueConstants.INHERIT_VALUE) || (v == SVG12ValueConstants.NORMAL_VALUE)) { return fontSize*1.1f; } float lineHeight = v.getFloatValue(); if (v instanceof ComputedValue) v = ((ComputedValue)v).getComputedValue(); if ((v instanceof LineHeightValue) && ((LineHeightValue)v).getFontSizeRelative()) lineHeight *= fontSize; return lineHeight; }