Tabnine Logo
AnimatableMotionPointValue
Code IndexAdd Tabnine to your IDE (free)

How to use
AnimatableMotionPointValue
in
org.apache.batik.anim.values

Best Java code snippets using org.apache.batik.anim.values.AnimatableMotionPointValue (Showing top 20 results out of 315)

origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Returns a zero value of this AnimatableValue's type.
 */
public AnimatableValue getZeroValue() {
  return new AnimatableMotionPointValue(target, 0f, 0f, 0f);
}
origin: org.apache.xmlgraphics/batik-anim

  /**
   * Returns a string representation of this object.
   */
  public String toStringRep() {
    StringBuffer sb = new StringBuffer();
    sb.append(formatNumber(x));
    sb.append(',');
    sb.append(formatNumber(y));
    sb.append(',');
    sb.append(formatNumber(angle));
    sb.append("rad");
    return sb.toString();
  }
}
origin: apache/batik

  /**
   * Updates a 'other' animation value in this target.
   */
  public void updateOtherValue(String type, AnimatableValue val) {
    if (type.equals("motion")) {
      if (motionTransform == null) {
        motionTransform = new AffineTransform();
      }
      if (val == null) {
        motionTransform.setToIdentity();
      } else {
        AnimatableMotionPointValue p = (AnimatableMotionPointValue) val;
        motionTransform.setToTranslation(p.getX(), p.getY());
        motionTransform.rotate(p.getAngle());
      }
      SVGOMDocument d = (SVGOMDocument) ownerDocument;
      d.getAnimatedAttributeListener().otherAnimationChanged(this, type);
    } else {
      super.updateOtherValue(type, val);
    }
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

if (from != null) {
  AnimatableMotionPointValue fromPt = (AnimatableMotionPointValue) from;
  float x = fromPt.getX();
  float y = fromPt.getY();
  path.moveTo(x, y);
  if (to != null) {
    AnimatableMotionPointValue toPt = (AnimatableMotionPointValue) to;
    path.lineTo(toPt.getX(), toPt.getY());
  } else if (by != null) {
    AnimatableMotionPointValue byPt = (AnimatableMotionPointValue) by;
    path.lineTo(x + byPt.getX(), y + byPt.getY());
  } else {
    throw timedElement.createException
      animatableElement.getUnderlyingValue();
    AnimatableMotionPointValue toPt = (AnimatableMotionPointValue) to;
    path.moveTo(unPt.getX(), unPt.getY());
    path.lineTo(toPt.getX(), toPt.getY());
    this.cumulative = false;
  } else if (by != null) {
    AnimatableMotionPointValue byPt = (AnimatableMotionPointValue) by;
    path.moveTo(0, 0);
    path.lineTo(byPt.getX(), byPt.getY());
    this.additive = true;
  } else {
path.moveTo(pt.getX(), pt.getY());
for (int i = 1; i < values.length; i++) {
  pt = (AnimatableMotionPointValue) values[i];
origin: org.apache.xmlgraphics/batik-anim

  /**
   * Updates a 'other' animation value in this target.
   */
  public void updateOtherValue(String type, AnimatableValue val) {
    if (type.equals("motion")) {
      if (motionTransform == null) {
        motionTransform = new AffineTransform();
      }
      if (val == null) {
        motionTransform.setToIdentity();
      } else {
        AnimatableMotionPointValue p = (AnimatableMotionPointValue) val;
        motionTransform.setToTranslation(p.getX(), p.getY());
        motionTransform.rotate(p.getAngle());
      }
      SVGOMDocument d = (SVGOMDocument) ownerDocument;
      d.getAnimatedAttributeListener().otherAnimationChanged(this, type);
    } else {
      super.updateOtherValue(type, val);
    }
  }
}
origin: org.apache.xmlgraphics/batik-anim

if (from != null) {
  AnimatableMotionPointValue fromPt = (AnimatableMotionPointValue) from;
  float x = fromPt.getX();
  float y = fromPt.getY();
  path.moveTo(x, y);
  if (to != null) {
    AnimatableMotionPointValue toPt = (AnimatableMotionPointValue) to;
    path.lineTo(toPt.getX(), toPt.getY());
  } else if (by != null) {
    AnimatableMotionPointValue byPt = (AnimatableMotionPointValue) by;
    path.lineTo(x + byPt.getX(), y + byPt.getY());
  } else {
    throw timedElement.createException
      animatableElement.getUnderlyingValue();
    AnimatableMotionPointValue toPt = (AnimatableMotionPointValue) to;
    path.moveTo(unPt.getX(), unPt.getY());
    path.lineTo(toPt.getX(), toPt.getY());
    this.cumulative = false;
  } else if (by != null) {
    AnimatableMotionPointValue byPt = (AnimatableMotionPointValue) by;
    path.moveTo(0, 0);
    path.lineTo(byPt.getX(), byPt.getY());
    this.additive = true;
  } else {
path.moveTo(pt.getX(), pt.getY());
for (int i = 1; i < values.length; i++) {
  pt = (AnimatableMotionPointValue) values[i];
origin: fr.avianey.apache-xmlgraphics/batik

  /**
   * Updates a 'other' animation value in this target.
   */
  public void updateOtherValue(String type, AnimatableValue val) {
    if (type.equals("motion")) {
      if (motionTransform == null) {
        motionTransform = new AffineTransform();
      }
      if (val == null) {
        motionTransform.setToIdentity();
      } else {
        AnimatableMotionPointValue p = (AnimatableMotionPointValue) val;
        motionTransform.setToTranslation(p.getX(), p.getY());
        motionTransform.rotate(p.getAngle());
      }
      SVGOMDocument d = (SVGOMDocument) ownerDocument;
      d.getAnimatedAttributeListener().otherAnimationChanged(this, type);
    } else {
      super.updateOtherValue(type, val);
    }
  }
}
origin: org.apache.xmlgraphics/batik-bridge

/**
 * Returns the underlying value of the animated attribute.  Used for
 * composition of additive animations.
 */
public AnimatableValue getUnderlyingValue() {
  return new AnimatableMotionPointValue(animationTarget, 0f, 0f, 0f);
}
origin: apache/batik

if (from != null) {
  AnimatableMotionPointValue fromPt = (AnimatableMotionPointValue) from;
  float x = fromPt.getX();
  float y = fromPt.getY();
  path.moveTo(x, y);
  if (to != null) {
    AnimatableMotionPointValue toPt = (AnimatableMotionPointValue) to;
    path.lineTo(toPt.getX(), toPt.getY());
  } else if (by != null) {
    AnimatableMotionPointValue byPt = (AnimatableMotionPointValue) by;
    path.lineTo(x + byPt.getX(), y + byPt.getY());
  } else {
    throw timedElement.createException
      animatableElement.getUnderlyingValue();
    AnimatableMotionPointValue toPt = (AnimatableMotionPointValue) to;
    path.moveTo(unPt.getX(), unPt.getY());
    path.lineTo(toPt.getX(), toPt.getY());
    this.cumulative = false;
  } else if (by != null) {
    AnimatableMotionPointValue byPt = (AnimatableMotionPointValue) by;
    path.moveTo(0, 0);
    path.lineTo(byPt.getX(), byPt.getY());
    this.additive = true;
  } else {
path.moveTo(pt.getX(), pt.getY());
for (int i = 1; i < values.length; i++) {
  pt = (AnimatableMotionPointValue) values[i];
origin: apache/batik

  /**
   * Returns a string representation of this object.
   */
  public String toStringRep() {
    StringBuffer sb = new StringBuffer();
    sb.append(formatNumber(x));
    sb.append(',');
    sb.append(formatNumber(y));
    sb.append(',');
    sb.append(formatNumber(angle));
    sb.append("rad");
    return sb.toString();
  }
}
origin: apache/batik

  /**
   * Updates a 'other' animation value in this target.
   */
  public void updateOtherValue(String type, AnimatableValue val) {
    if (type.equals("motion")) {
      if (motionTransform == null) {
        motionTransform = new AffineTransform();
      }
      if (val == null) {
        motionTransform.setToIdentity();
      } else {
        AnimatableMotionPointValue p = (AnimatableMotionPointValue) val;
        motionTransform.setToTranslation(p.getX(), p.getY());
        motionTransform.rotate(p.getAngle());
      }
      SVGOMDocument d = (SVGOMDocument) ownerDocument;
      d.getAnimatedAttributeListener().otherAnimationChanged(this, type);
    } else {
      super.updateOtherValue(type, val);
    }
  }
}
origin: org.apache.xmlgraphics/batik-anim

/**
 * Returns a zero value of this AnimatableValue's type.
 */
public AnimatableValue getZeroValue() {
  return new AnimatableMotionPointValue(target, 0f, 0f, 0f);
}
origin: fr.avianey.apache-xmlgraphics/batik

  /**
   * Returns a string representation of this object.
   */
  public String toStringRep() {
    StringBuffer sb = new StringBuffer();
    sb.append(formatNumber(x));
    sb.append(',');
    sb.append(formatNumber(y));
    sb.append(',');
    sb.append(formatNumber(angle));
    sb.append("rad");
    return sb.toString();
  }
}
origin: org.apache.xmlgraphics/batik-anim

  /**
   * Updates a 'other' animation value in this target.
   */
  public void updateOtherValue(String type, AnimatableValue val) {
    if (type.equals("motion")) {
      if (motionTransform == null) {
        motionTransform = new AffineTransform();
      }
      if (val == null) {
        motionTransform.setToIdentity();
      } else {
        AnimatableMotionPointValue p = (AnimatableMotionPointValue) val;
        motionTransform.setToTranslation(p.getX(), p.getY());
        motionTransform.rotate(p.getAngle());
      }
      SVGOMDocument d = (SVGOMDocument) ownerDocument;
      d.getAnimatedAttributeListener().otherAnimationChanged(this, type);
    } else {
      super.updateOtherValue(type, val);
    }
  }
}
origin: apache/batik

/**
 * Returns a zero value of this AnimatableValue's type.
 */
public AnimatableValue getZeroValue() {
  return new AnimatableMotionPointValue(target, 0f, 0f, 0f);
}
origin: fr.avianey.apache-xmlgraphics/batik

  /**
   * Updates a 'other' animation value in this target.
   */
  public void updateOtherValue(String type, AnimatableValue val) {
    if (type.equals("motion")) {
      if (motionTransform == null) {
        motionTransform = new AffineTransform();
      }
      if (val == null) {
        motionTransform.setToIdentity();
      } else {
        AnimatableMotionPointValue p = (AnimatableMotionPointValue) val;
        motionTransform.setToTranslation(p.getX(), p.getY());
        motionTransform.rotate(p.getAngle());
      }
      SVGOMDocument d = (SVGOMDocument) ownerDocument;
      d.getAnimatedAttributeListener().otherAnimationChanged(this, type);
    } else {
      super.updateOtherValue(type, val);
    }
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Returns the underlying value of the animated attribute.  Used for
 * composition of additive animations.
 */
public AnimatableValue getUnderlyingValue() {
  return new AnimatableMotionPointValue(animationTarget, 0f, 0f, 0f);
}
origin: apache/batik

/**
 * Returns the underlying value of the animated attribute.  Used for
 * composition of additive animations.
 */
public AnimatableValue getUnderlyingValue() {
  return new AnimatableMotionPointValue(animationTarget, 0f, 0f, 0f);
}
origin: org.apache.xmlgraphics/batik-anim

AnimatableMotionPointValue res;
if (result == null) {
  res = new AnimatableMotionPointValue(target);
} else {
  res = (AnimatableMotionPointValue) result;
origin: apache/batik

AnimatableMotionPointValue res;
if (result == null) {
  res = new AnimatableMotionPointValue(target);
} else {
  res = (AnimatableMotionPointValue) result;
org.apache.batik.anim.valuesAnimatableMotionPointValue

Javadoc

A point value in the animation system from a motion animation.

Most used methods

  • <init>
    Creates a new AnimatableMotionPointValue with one x.
  • formatNumber
  • getAngle
    Returns the rotation angle.
  • getX
    Returns the x coordinate.
  • getY
    Returns the y coordinate.

Popular in Java

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Reference (javax.naming)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now