protected AnimatableValue createAnimatableValue(AnimationTarget target, String pn, Value v) { Paint p = PaintServer.convertPaint (target.getElement(), null, v, 1.0f, ctx); if (p instanceof Color) { Color c = (Color) p; return new AnimatableColorValue(target, c.getRed() / 255f, c.getGreen() / 255f, c.getBlue() / 255f); } // XXX Indicate that the parsed value wasn't a Color? return null; } }
protected AnimatableValue createAnimatableValue(AnimationTarget target, String pn, Value v) { Paint p = PaintServer.convertPaint (target.getElement(), null, v, 1.0f, ctx); if (p instanceof Color) { Color c = (Color) p; return new AnimatableColorValue(target, c.getRed() / 255f, c.getGreen() / 255f, c.getBlue() / 255f); } // XXX Indicate that the parsed value wasn't a Color? return null; } }
protected AnimatableValue createAnimatableValue(AnimationTarget target, String pn, Value v) { Paint p = PaintServer.convertPaint (target.getElement(), null, v, 1.0f, ctx); if (p instanceof Color) { Color c = (Color) p; return new AnimatableColorValue(target, c.getRed() / 255f, c.getGreen() / 255f, c.getBlue() / 255f); } // XXX Indicate that the parsed value wasn't a Color? return null; } }
/** * Creates a new CSS {@link Value} from a string. */ protected Value createCSSValue(AnimationTarget t, String pn, String s) { CSSStylableElement elt = (CSSStylableElement) t.getElement(); Value v = cssEngine.parsePropertyValue(elt, pn, s); return computeValue(elt, pn, v); }
public AnimatableValue createValue(AnimationTarget target, String pn, Value v) { CSSStylableElement elt = (CSSStylableElement) target.getElement(); v = computeValue(elt, pn, v); return createAnimatableValue(target, pn, v); }
public AnimatableValue createValue(AnimationTarget target, String pn, Value v) { CSSStylableElement elt = (CSSStylableElement) target.getElement(); v = computeValue(elt, pn, v); return createAnimatableValue(target, pn, v); }
public AnimatableValue createValue(AnimationTarget target, String pn, Value v) { CSSStylableElement elt = (CSSStylableElement) target.getElement(); v = computeValue(elt, pn, v); return createAnimatableValue(target, pn, v); }
/** * Creates a new CSS {@link Value} from a string. */ protected Value createCSSValue(AnimationTarget t, String pn, String s) { CSSStylableElement elt = (CSSStylableElement) t.getElement(); Value v = cssEngine.parsePropertyValue(elt, pn, s); return computeValue(elt, pn, v); }
/** * Creates a new CSS {@link Value} from a string. */ protected Value createCSSValue(AnimationTarget t, String pn, String s) { CSSStylableElement elt = (CSSStylableElement) t.getElement(); Value v = cssEngine.parsePropertyValue(elt, pn, s); return computeValue(elt, pn, v); }
/** * Parses an AnimatableValue. */ public AnimatableValue parseAnimatableValue(Element animElt, AnimationTarget target, String ns, String ln, boolean isCSS, String s) { SVGOMElement elt = (SVGOMElement) target.getElement(); int type; if (isCSS) { type = elt.getPropertyType(ln); } else { type = elt.getAttributeType(ns, ln); } Factory factory = factories[type]; if (factory == null) { String an = ns == null ? ln : '{' + ns + '}' + ln; throw new BridgeException (ctx, animElt, "attribute.not.animatable", new Object[] { target.getElement().getNodeName(), an }); } return factories[type].createValue(target, ns, ln, isCSS, s); }
/** * Parses an AnimatableValue. */ public AnimatableValue parseAnimatableValue(Element animElt, AnimationTarget target, String ns, String ln, boolean isCSS, String s) { SVGOMElement elt = (SVGOMElement) target.getElement(); int type; if (isCSS) { type = elt.getPropertyType(ln); } else { type = elt.getAttributeType(ns, ln); } Factory factory = factories[type]; if (factory == null) { String an = ns == null ? ln : '{' + ns + '}' + ln; throw new BridgeException (ctx, animElt, "attribute.not.animatable", new Object[] { target.getElement().getNodeName(), an }); } return factories[type].createValue(target, ns, ln, isCSS, s); }
/** * Parses an AnimatableValue. */ public AnimatableValue parseAnimatableValue(Element animElt, AnimationTarget target, String ns, String ln, boolean isCSS, String s) { SVGOMElement elt = (SVGOMElement) target.getElement(); int type; if (isCSS) { type = elt.getPropertyType(ln); } else { type = elt.getAttributeType(ns, ln); } Factory factory = factories[type]; if (factory == null) { String an = ns == null ? ln : '{' + ns + '}' + ln; throw new BridgeException (ctx, animElt, "attribute.not.animatable", new Object[] { target.getElement().getNodeName(), an }); } return factories[type].createValue(target, ns, ln, isCSS, s); }
throw new BridgeException (ctx, animElt, "attribute.not.animatable", new Object[] { target.getElement().getNodeName(), pn }); SVGStylableElement e = (SVGStylableElement) target.getElement(); CSSStyleDeclaration over = e.getOverrideStyle(); String oldValue = over.getPropertyValue(pn);
throw new BridgeException (ctx, animElt, "attribute.not.animatable", new Object[] { target.getElement().getNodeName(), pn }); SVGStylableElement e = (SVGStylableElement) target.getElement(); CSSStyleDeclaration over = e.getOverrideStyle(); String oldValue = over.getPropertyValue(pn);
throw new BridgeException (ctx, animElt, "attribute.not.animatable", new Object[] { target.getElement().getNodeName(), pn }); SVGStylableElement e = (SVGStylableElement) target.getElement(); CSSStyleDeclaration over = e.getOverrideStyle(); String oldValue = over.getPropertyValue(pn);
case CSSPrimitiveValue.CSS_RGBCOLOR: { Paint p = PaintServer.convertPaint (target.getElement(), null, v, 1.0f, ctx); return createColorPaintValue(target, (Color) p); case CSSPrimitiveValue.CSS_RGBCOLOR: { Paint p = PaintServer.convertPaint (target.getElement(), null, v, 1.0f, ctx); return createColorPaintValue(target, (Color) p); case CSSPrimitiveValue.CSS_RGBCOLOR: { Paint p = PaintServer.convertPaint (target.getElement(), null, v.item(1), 1.0f, ctx); return createColorPaintValue(target, (Color) p);
case CSSPrimitiveValue.CSS_RGBCOLOR: { Paint p = PaintServer.convertPaint (target.getElement(), null, v, 1.0f, ctx); return createColorPaintValue(target, (Color) p); case CSSPrimitiveValue.CSS_RGBCOLOR: { Paint p = PaintServer.convertPaint (target.getElement(), null, v, 1.0f, ctx); return createColorPaintValue(target, (Color) p); case CSSPrimitiveValue.CSS_RGBCOLOR: { Paint p = PaintServer.convertPaint (target.getElement(), null, v.item(1), 1.0f, ctx); return createColorPaintValue(target, (Color) p);
case CSSPrimitiveValue.CSS_RGBCOLOR: { Paint p = PaintServer.convertPaint (target.getElement(), null, v, 1.0f, ctx); return createColorPaintValue(target, (Color) p); case CSSPrimitiveValue.CSS_RGBCOLOR: { Paint p = PaintServer.convertPaint (target.getElement(), null, v, 1.0f, ctx); return createColorPaintValue(target, (Color) p); case CSSPrimitiveValue.CSS_RGBCOLOR: { Paint p = PaintServer.convertPaint (target.getElement(), null, v.item(1), 1.0f, ctx); return createColorPaintValue(target, (Color) p);