/** * Returns a zero value of this AnimatableValue's type. */ public AnimatableValue getZeroValue() { return AnimatablePaintValue.createColorPaintValue(target, 0f, 0f, 0f); }
/** * Creates a new AnimatablePaintValue for a URI reference with a * 'currentColor' fallback. */ public static AnimatablePaintValue createURICurrentColorPaintValue (AnimationTarget target, String uri) { AnimatablePaintValue v = new AnimatablePaintValue(target); v.uri = uri; v.paintType = PAINT_URI_CURRENT_COLOR; return v; }
/** * Returns whether the specified {@link AnimatableValue} is of a type allowed * by this animation. */ protected boolean checkValueType(AnimatableValue v) { if (v instanceof AnimatablePaintValue) { return ((AnimatablePaintValue) v).getPaintType() == AnimatablePaintValue.PAINT_COLOR; } return v instanceof AnimatableColorValue; } }
switch (v.getPrimitiveType()) { case CSSPrimitiveValue.CSS_IDENT: return AnimatablePaintValue.createNonePaintValue(target); case CSSPrimitiveValue.CSS_RGBCOLOR: { Paint p = PaintServer.convertPaint return AnimatablePaintValue.createURIPaintValue (target, v.getStringValue()); switch (v2.getPrimitiveType()) { case CSSPrimitiveValue.CSS_IDENT: return AnimatablePaintValue.createURINonePaintValue (target, v1.getStringValue()); case CSSPrimitiveValue.CSS_RGBCOLOR: {
switch (v.getPrimitiveType()) { case CSSPrimitiveValue.CSS_IDENT: return AnimatablePaintValue.createNonePaintValue(target); case CSSPrimitiveValue.CSS_RGBCOLOR: { Paint p = PaintServer.convertPaint return AnimatablePaintValue.createURIPaintValue (target, v.getStringValue()); switch (v2.getPrimitiveType()) { case CSSPrimitiveValue.CSS_IDENT: return AnimatablePaintValue.createURINonePaintValue (target, v1.getStringValue()); case CSSPrimitiveValue.CSS_RGBCOLOR: {
switch (v.getPrimitiveType()) { case CSSPrimitiveValue.CSS_IDENT: return AnimatablePaintValue.createNonePaintValue(target); case CSSPrimitiveValue.CSS_RGBCOLOR: { Paint p = PaintServer.convertPaint return AnimatablePaintValue.createURIPaintValue (target, v.getStringValue()); switch (v2.getPrimitiveType()) { case CSSPrimitiveValue.CSS_IDENT: return AnimatablePaintValue.createURINonePaintValue (target, v1.getStringValue()); case CSSPrimitiveValue.CSS_RGBCOLOR: {
/** * Creates a new AnimatablePaintValue for a URI reference. */ public static AnimatablePaintValue createURIPaintValue (AnimationTarget target, String uri) { AnimatablePaintValue v = new AnimatablePaintValue(target); v.uri = uri; v.paintType = PAINT_URI; return v; }
/** * Returns a zero value of this AnimatableValue's type. */ public AnimatableValue getZeroValue() { return AnimatablePaintValue.createColorPaintValue(target, 0f, 0f, 0f); }
/** * Returns whether the specified {@link AnimatableValue} is of a type allowed * by this animation. */ protected boolean checkValueType(AnimatableValue v) { if (v instanceof AnimatablePaintValue) { return ((AnimatablePaintValue) v).getPaintType() == AnimatablePaintValue.PAINT_COLOR; } return v instanceof AnimatableColorValue; } }
/** * Creates a new AnimatablePaintValue for a 'currentColor' value. */ public static AnimatablePaintValue createCurrentColorPaintValue (AnimationTarget target) { AnimatablePaintValue v = new AnimatablePaintValue(target); v.paintType = PAINT_CURRENT_COLOR; return v; }
/** * Returns a zero value of this AnimatableValue's type. */ public AnimatableValue getZeroValue() { return AnimatablePaintValue.createColorPaintValue(target, 0f, 0f, 0f); }
/** * Returns whether the specified {@link AnimatableValue} is of a type allowed * by this animation. */ protected boolean checkValueType(AnimatableValue v) { if (v instanceof AnimatablePaintValue) { return ((AnimatablePaintValue) v).getPaintType() == AnimatablePaintValue.PAINT_COLOR; } return v instanceof AnimatableColorValue; } }
/** * Creates a new AnimatablePaintValue for a URI reference with a * 'none' fallback. */ public static AnimatablePaintValue createURINonePaintValue (AnimationTarget target, String uri) { AnimatablePaintValue v = new AnimatablePaintValue(target); v.uri = uri; v.paintType = PAINT_URI_NONE; return v; }
/** * Creates a new {@link AnimatablePaintValue} from a {@link Color} * object. */ protected AnimatablePaintValue createColorPaintValue(AnimationTarget t, Color c) { return AnimatablePaintValue.createColorPaintValue (t, c.getRed() / 255f, c.getGreen() / 255f, c.getBlue() / 255f); }
/** * Creates a new AnimatablePaintValue for a 'inherit' value. */ public static AnimatablePaintValue createInheritPaintValue (AnimationTarget target) { AnimatablePaintValue v = new AnimatablePaintValue(target); v.paintType = PAINT_INHERIT; return v; }
/** * Creates a new {@link AnimatablePaintValue} from a {@link Color} * object. */ protected AnimatablePaintValue createColorPaintValue(AnimationTarget t, Color c) { return AnimatablePaintValue.createColorPaintValue (t, c.getRed() / 255f, c.getGreen() / 255f, c.getBlue() / 255f); }
/** * Creates a new AnimatablePaintValue for a 'inherit' value. */ public static AnimatablePaintValue createInheritPaintValue (AnimationTarget target) { AnimatablePaintValue v = new AnimatablePaintValue(target); v.paintType = PAINT_INHERIT; return v; }
/** * Creates a new {@link AnimatablePaintValue} from a {@link Color} * object. */ protected AnimatablePaintValue createColorPaintValue(AnimationTarget t, Color c) { return AnimatablePaintValue.createColorPaintValue (t, c.getRed() / 255f, c.getGreen() / 255f, c.getBlue() / 255f); }
/** * Creates a new AnimatablePaintValue for a URI reference with a * 'currentColor' fallback. */ public static AnimatablePaintValue createURICurrentColorPaintValue (AnimationTarget target, String uri) { AnimatablePaintValue v = new AnimatablePaintValue(target); v.uri = uri; v.paintType = PAINT_URI_CURRENT_COLOR; return v; }
/** * Creates a new AnimatablePaintValue for a URI reference with a * color fallback. */ public static AnimatablePaintValue createURIColorPaintValue (AnimationTarget target, String uri, float r, float g, float b) { AnimatablePaintValue v = new AnimatablePaintValue(target, r, g, b); v.uri = uri; v.paintType = PAINT_URI_COLOR; return v; }