/** * Returns the opacity represented by the specified CSSValue. * @param v the value that represents the opacity * @return the opacity between 0 and 1 */ public static float convertOpacity(Value v) { float r = v.getFloatValue(); return (r < 0f) ? 0f : (r > 1.0f) ? 1.0f : r; } }
/** * Returns the opacity represented by the specified CSSValue. * @param v the value that represents the opacity * @return the opacity between 0 and 1 */ public static float convertOpacity(Value v) { float r = v.getFloatValue(); return (r < 0f) ? 0f : (r > 1.0f) ? 1.0f : r; } }
/** * Converts the 'miterlimit' property to the appropriate float number. * @param v the CSS value describing the miterlimit property */ public static float convertStrokeMiterlimit(Value v) { float miterlimit = v.getFloatValue(); return (miterlimit < 1.0f) ? 1.0f : miterlimit; }
/** * Returns the opacity represented by the specified CSSValue. * @param v the value that represents the opacity * @return the opacity between 0 and 1 */ public static float convertOpacity(Value v) { float r = v.getFloatValue(); return (r < 0f) ? 0f : (r > 1.0f) ? 1.0f : r; } }
/** * Implements {@link Value#getFloatValue()}. */ public float getFloatValue() throws DOMException { return computedValue.getFloatValue(); }
/** * Implements {@link Value#getFloatValue()}. */ public float getFloatValue() throws DOMException { return computedValue.getFloatValue(); }
/** * Returns the font-size on the associated element. */ public float getFontSize() { return CSSUtilities.getComputedStyle (e, SVGCSSEngine.FONT_SIZE_INDEX).getFloatValue(); } }
/** * Converts the font-size CSS value to a float value. * @param e the element */ public static Float convertFontSize(Element e) { Value v = CSSUtilities.getComputedStyle (e, SVGCSSEngine.FONT_SIZE_INDEX); return new Float(v.getFloatValue()); }
/** * Returns the font-size on the associated element. */ public float getFontSize() { return CSSUtilities.getComputedStyle (e, SVGCSSEngine.FONT_SIZE_INDEX).getFloatValue(); } }
/** * Returns the font-size value. */ public float getFontSize() { return CSSUtilities.getComputedStyle (e, SVGCSSEngine.FONT_SIZE_INDEX).getFloatValue(); }
/** * Creates a new AnimatableValue from a CSS {@link Value}. */ public AnimatableValue createValue(AnimationTarget target, String pn, Value v) { return new AnimatableIntegerValue(target, Math.round(v.getFloatValue())); } }
/** * Creates a new AnimatableValue from a CSS {@link Value}. */ public AnimatableValue createValue(AnimationTarget target, String pn, Value v) { return new AnimatableIntegerValue(target, Math.round(v.getFloatValue())); } }
/** * Converts the font-size CSS value to a float value. * @param e the element */ public static Float convertFontSize(Element e) { Value v = CSSUtilities.getComputedStyle (e, SVGCSSEngine.FONT_SIZE_INDEX); return v.getFloatValue(); }
/** * Returns the font-size on the associated element. */ public float getFontSize() { return CSSUtilities.getComputedStyle (e, SVGCSSEngine.FONT_SIZE_INDEX).getFloatValue(); } }
/** * Creates a new AnimatableValue from a CSS {@link Value}. */ public AnimatableValue createValue(AnimationTarget target, String pn, Value v) { return new AnimatableIntegerValue(target, Math.round(v.getFloatValue())); } }
/** * Creates a new AnimatableValue from a CSS {@link Value}. */ public AnimatableValue createValue(AnimationTarget target, String pn, Value v) { return new AnimatableNumberValue(target, v.getFloatValue()); } }
/** * Creates a new AnimatableValue from a CSS {@link Value}. */ public AnimatableValue createValue(AnimationTarget target, String pn, Value v) { return new AnimatableNumberValue(target, v.getFloatValue()); } }
/** * Returns the font-size value. */ public float getFontSize() { return CSSUtilities.getComputedStyle (e, SVGCSSEngine.FONT_SIZE_INDEX).getFloatValue(); }
public static float getFloatProp(StyleMap sm, CSSEngine eng, int pidx) { Value v = sm.getValue(pidx); ValueManager [] vms = eng.getValueManagers(); if (v == null) { ValueManager vm = vms[pidx]; v = vm.getDefaultValue(); } while (v.getCssValueType() == CSSValue.CSS_VALUE_LIST) { v = v.item(0); } return v.getFloatValue(); }
public static float getFloatProp(StyleMap sm, CSSEngine eng, int pidx) { Value v = sm.getValue(pidx); ValueManager [] vms = eng.getValueManagers(); if (v == null) { ValueManager vm = vms[pidx]; v = vm.getDefaultValue(); } while (v.getCssValueType() == CSSValue.CSS_VALUE_LIST) { v = v.item(0); } return v.getFloatValue(); }