org.apache.batik.anim.values

Class AnimatableRectValue

public class AnimatableRectValue extends AnimatableValue

An SVG rect value in the animation system.
Field Summary
protected floatheight
The height.
protected floatwidth
The width.
protected floatx
The x coordinate.
protected floaty
The y coordinate.
Constructor Summary
protected AnimatableRectValue(AnimationTarget target)
Creates a new, uninitialized AnimatableRectValue.
AnimatableRectValue(AnimationTarget target, float x, float y, float w, float h)
Creates a new AnimatableRectValue with one number.
Method Summary
booleancanPace()
Returns whether two values of this type can have their distance computed, as needed by paced animation.
floatdistanceTo(AnimatableValue other)
Returns the absolute distance between this value and the specified other value.
floatgetHeight()
Returns the height.
floatgetWidth()
Returns the width.
floatgetX()
Returns the x coordinate.
floatgetY()
Returns the y coordinate.
AnimatableValuegetZeroValue()
Returns a zero value of this AnimatableValue's type.
AnimatableValueinterpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier)
Performs interpolation to the given value.
StringtoStringRep()
Returns a string representation of this object.

Field Detail

height

protected float height
The height.

width

protected float width
The width.

x

protected float x
The x coordinate.

y

protected float y
The y coordinate.

Constructor Detail

AnimatableRectValue

protected AnimatableRectValue(AnimationTarget target)
Creates a new, uninitialized AnimatableRectValue.

AnimatableRectValue

public AnimatableRectValue(AnimationTarget target, float x, float y, float w, float h)
Creates a new AnimatableRectValue with one number.

Method Detail

canPace

public boolean canPace()
Returns whether two values of this type can have their distance computed, as needed by paced animation.

distanceTo

public float distanceTo(AnimatableValue other)
Returns the absolute distance between this value and the specified other value.

getHeight

public float getHeight()
Returns the height.

getWidth

public float getWidth()
Returns the width.

getX

public float getX()
Returns the x coordinate.

getY

public float getY()
Returns the y coordinate.

getZeroValue

public AnimatableValue getZeroValue()
Returns a zero value of this AnimatableValue's type.

interpolate

public AnimatableValue interpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier)
Performs interpolation to the given value. Rect values cannot be interpolated.

toStringRep

public String toStringRep()
Returns a string representation of this object.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.