/** * Returns a zero value of this AnimatableValue's type. */ public AnimatableValue getZeroValue() { return new AnimatableColorValue(target, 0f, 0f, 0f); }
/** * Returns the CSS text representation of the value. */ public String getCssText() { switch (paintType) { case PAINT_NONE: return "none"; case PAINT_CURRENT_COLOR: return "currentColor"; case PAINT_COLOR: return super.getCssText(); case PAINT_URI: return "url(" + uri + ")"; case PAINT_URI_NONE: return "url(" + uri + ") none"; case PAINT_URI_CURRENT_COLOR: return "url(" + uri + ") currentColor"; case PAINT_URI_COLOR: return "url(" + uri + ") " + super.getCssText(); default: // PAINT_INHERIT return "inherit"; } } }
return super.interpolate (res, to, interpolation, accumulation, multiplier);
return super.interpolate (res, to, interpolation, accumulation, multiplier);
/** * Returns a zero value of this AnimatableValue's type. */ public AnimatableValue getZeroValue() { return new AnimatableColorValue(target, 0f, 0f, 0f); }
/** * Returns the CSS text representation of the value. */ public String getCssText() { switch (paintType) { case PAINT_NONE: return "none"; case PAINT_CURRENT_COLOR: return "currentColor"; case PAINT_COLOR: return super.getCssText(); case PAINT_URI: return "url(" + uri + ")"; case PAINT_URI_NONE: return "url(" + uri + ") none"; case PAINT_URI_CURRENT_COLOR: return "url(" + uri + ") currentColor"; case PAINT_URI_COLOR: return "url(" + uri + ") " + super.getCssText(); default: // PAINT_INHERIT return "inherit"; } } }
return super.interpolate (res, to, interpolation, accumulation, multiplier);
/** * Returns a zero value of this AnimatableValue's type. */ public AnimatableValue getZeroValue() { return new AnimatableColorValue(target, 0f, 0f, 0f); }
/** * Returns the CSS text representation of the value. */ public String getCssText() { switch (paintType) { case PAINT_NONE: return "none"; case PAINT_CURRENT_COLOR: return "currentColor"; case PAINT_COLOR: return super.getCssText(); case PAINT_URI: return "url(" + uri + ")"; case PAINT_URI_NONE: return "url(" + uri + ") none"; case PAINT_URI_CURRENT_COLOR: return "url(" + uri + ") currentColor"; case PAINT_URI_COLOR: return "url(" + uri + ") " + super.getCssText(); default: // PAINT_INHERIT return "inherit"; } } }
AnimatableColorValue res; if (result == null) { res = new AnimatableColorValue(target); } else { res = (AnimatableColorValue) result;
AnimatableColorValue res; if (result == null) { res = new AnimatableColorValue(target); } else { res = (AnimatableColorValue) result;
AnimatableColorValue res; if (result == null) { res = new AnimatableColorValue(target); } else { res = (AnimatableColorValue) result;
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; } }