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

How to use
AbstractSVGTransform
in
org.apache.batik.dom.svg

Best Java code snippets using org.apache.batik.dom.svg.AbstractSVGTransform (Showing top 20 results out of 315)

origin: apache/batik

/**
 * Returns the distance between this value's third component and the
 * specified other value's third component.
 */
public float distanceTo3(AnimatableValue other) {
  AnimatableTransformListValue o = (AnimatableTransformListValue) other;
  if (transforms.isEmpty() || o.transforms.isEmpty()) {
    return 0f;
  }
  AbstractSVGTransform t1 = (AbstractSVGTransform) transforms.lastElement();
  AbstractSVGTransform t2 = (AbstractSVGTransform) o.transforms.lastElement();
  short type1 = t1.getType();
  if (type1 != t2.getType()) {
    return 0f;
  }
  if (type1 == SVGTransform.SVG_TRANSFORM_ROTATE) {
    return Math.abs(t1.getY() - t2.getY());
  }
  return 0f;
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * <b>DOM</b>: Implements {@link
 * SVGTransform#setRotate(float,float,float)}.
 */
public void setRotate(float angle, float cx, float cy) {
  super.setRotate(angle, cx, cy);
  resetAttribute();
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * <b>DOM</b>: Implements {@link SVGTransform#setScale(float,float)}.
 */
public void setScale(float sx, float sy) {
  super.setScale(sx, sy);
  resetAttribute();
}
origin: org.apache.xmlgraphics/batik-anim

  type = tt.getType();
  switch (type) {
    case SVGTransform.SVG_TRANSFORM_SKEWX:
  type = ft.getType();
if (type == tt.getType()) {
  AbstractSVGTransform t;
  if (res.transforms.isEmpty()) {
    case SVGTransform.SVG_TRANSFORM_SKEWX:
    case SVGTransform.SVG_TRANSFORM_SKEWY:
      r = ft.getAngle();
      r += interpolation * (tt.getAngle() - r);
      if (type == SVGTransform.SVG_TRANSFORM_SKEWX) {
        t.setSkewX(r);
      } else if (type == SVGTransform.SVG_TRANSFORM_SKEWY) {
        t.setSkewY(r);
      SVGMatrix fm = ft.getMatrix();
      SVGMatrix tm = tt.getMatrix();
      x = fm.getA();
      y = fm.getD();
      x += interpolation * (tm.getA() - x);
      y += interpolation * (tm.getD() - y);
      t.setScale(x, y);
      break;
      x = ft.getX();
origin: fr.avianey.apache-xmlgraphics/batik

int type = ft1.getType();
  x = ft1.getMatrix().getA();
  y = ft2.getMatrix().getD();
} else {
  x = ft1.getMatrix().getE();
  y = ft2.getMatrix().getF();
    x += interpolation1 * (tt1.getMatrix().getA() - x);
    y += interpolation2 * (tt2.getMatrix().getD() - y);
  } else {
    x += interpolation1 * (tt1.getMatrix().getE() - x);
    y += interpolation2 * (tt2.getMatrix().getF() - y);
  t.setScale(x, y);
} else {
  t.setTranslate(x, y);
r = ft1.getAngle();
x = ft2.getX();
y = ft3.getY();
  r += interpolation1 * (tt1.getAngle() - r);
  x += interpolation2 * (tt2.getX() - x);
  y += interpolation3 * (tt3.getY() - y);
t.setRotate(r, x, y);
origin: fr.avianey.apache-xmlgraphics/batik

  sb.append("null");
} else {
  SVGMatrix m = t.getMatrix();
  switch (t.getType()) {
    case SVGTransform.SVG_TRANSFORM_TRANSLATE:
      sb.append("translate(");
    case SVGTransform.SVG_TRANSFORM_SKEWX:
      sb.append("skewX(");
      sb.append(t.getAngle());
      sb.append(')');
      break;
    case SVGTransform.SVG_TRANSFORM_SKEWY:
      sb.append("skewY(");
      sb.append(t.getAngle());
      sb.append(')');
      break;
    case SVGTransform.SVG_TRANSFORM_ROTATE:
      sb.append("rotate(");
      sb.append(t.getAngle());
      sb.append(',');
      sb.append(t.getX());
      sb.append(',');
      sb.append(t.getY());
      sb.append(')');
      break;
origin: org.apache.xmlgraphics/batik-anim

/**
 * Returns the distance between this value's first component and the
 * specified other value's first component.
 */
public float distanceTo1(AnimatableValue other) {
  AnimatableTransformListValue o = (AnimatableTransformListValue) other;
  if (transforms.isEmpty() || o.transforms.isEmpty()) {
    return 0f;
  }
  AbstractSVGTransform t1 = (AbstractSVGTransform) transforms.lastElement();
  AbstractSVGTransform t2 = (AbstractSVGTransform) o.transforms.lastElement();
  short type1 = t1.getType();
  if (type1 != t2.getType()) {
    return 0f;
  }
  SVGMatrix m1 = t1.getMatrix();
  SVGMatrix m2 = t2.getMatrix();
  switch (type1) {
    case SVGTransform.SVG_TRANSFORM_TRANSLATE:
      return Math.abs(m1.getE() - m2.getE());
    case SVGTransform.SVG_TRANSFORM_SCALE:
      return Math.abs(m1.getA() - m2.getA());
    case SVGTransform.SVG_TRANSFORM_ROTATE:
    case SVGTransform.SVG_TRANSFORM_SKEWX:
    case SVGTransform.SVG_TRANSFORM_SKEWY:
      return Math.abs(t1.getAngle() - t2.getAngle());
  }
  return 0f;
}
origin: fr.avianey.apache-xmlgraphics/batik

  AbstractSVGTransform internal =
    (AbstractSVGTransform) transform;
  setRotate(internal.getAngle(),
       internal.getX(), internal.getY());
} else {
origin: org.apache.xmlgraphics/batik-anim

/**
 * Returns the distance between this value's second component and the
 * specified other value's second component.
 */
public float distanceTo2(AnimatableValue other) {
  AnimatableTransformListValue o = (AnimatableTransformListValue) other;
  if (transforms.isEmpty() || o.transforms.isEmpty()) {
    return 0f;
  }
  AbstractSVGTransform t1 = (AbstractSVGTransform) transforms.lastElement();
  AbstractSVGTransform t2 = (AbstractSVGTransform) o.transforms.lastElement();
  short type1 = t1.getType();
  if (type1 != t2.getType()) {
    return 0f;
  }
  SVGMatrix m1 = t1.getMatrix();
  SVGMatrix m2 = t2.getMatrix();
  switch (type1) {
    case SVGTransform.SVG_TRANSFORM_TRANSLATE:
      return Math.abs(m1.getF() - m2.getF());
    case SVGTransform.SVG_TRANSFORM_SCALE:
      return Math.abs(m1.getD() - m2.getD());
    case SVGTransform.SVG_TRANSFORM_ROTATE:
      return Math.abs(t1.getX() - t2.getX());
  }
  return 0f;
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * <b>DOM</b>: Implements {@link SVGTransform#setTranslate(float,float)}.
 */
public void setTranslate(float tx, float ty) {
  super.setTranslate(tx, ty);
  resetAttribute();
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * <b>DOM</b>: Implements {@link SVGTransform#setSkewX(float)}.
 */
public void setSkewX(float angle) {
  super.setSkewX(angle);
  resetAttribute();
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * <b>DOM</b>: Implements {@link SVGTransform#setSkewY(float)}.
 */
public void setSkewY(float angle) {
  super.setSkewY(angle);
  resetAttribute();
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * <b>DOM</b>: Implements {@link SVGTransform#getMatrix()}.
 */
public SVGMatrix getMatrix() {
  return createMatrix();
}
origin: fr.avianey.apache-xmlgraphics/batik

  type = tt.getType();
  switch (type) {
    case SVGTransform.SVG_TRANSFORM_SKEWX:
  type = ft.getType();
if (type == tt.getType()) {
  AbstractSVGTransform t;
  if (res.transforms.isEmpty()) {
    case SVGTransform.SVG_TRANSFORM_SKEWX:
    case SVGTransform.SVG_TRANSFORM_SKEWY:
      r = ft.getAngle();
      r += interpolation * (tt.getAngle() - r);
      if (type == SVGTransform.SVG_TRANSFORM_SKEWX) {
        t.setSkewX(r);
      } else if (type == SVGTransform.SVG_TRANSFORM_SKEWY) {
        t.setSkewY(r);
      SVGMatrix fm = ft.getMatrix();
      SVGMatrix tm = tt.getMatrix();
      x = fm.getA();
      y = fm.getD();
      x += interpolation * (tm.getA() - x);
      y += interpolation * (tm.getD() - y);
      t.setScale(x, y);
      break;
      x = ft.getX();
origin: org.apache.xmlgraphics/batik-anim

int type = ft1.getType();
  x = ft1.getMatrix().getA();
  y = ft2.getMatrix().getD();
} else {
  x = ft1.getMatrix().getE();
  y = ft2.getMatrix().getF();
    x += interpolation1 * (tt1.getMatrix().getA() - x);
    y += interpolation2 * (tt2.getMatrix().getD() - y);
  } else {
    x += interpolation1 * (tt1.getMatrix().getE() - x);
    y += interpolation2 * (tt2.getMatrix().getF() - y);
  t.setScale(x, y);
} else {
  t.setTranslate(x, y);
r = ft1.getAngle();
x = ft2.getX();
y = ft3.getY();
  r += interpolation1 * (tt1.getAngle() - r);
  x += interpolation2 * (tt2.getX() - x);
  y += interpolation3 * (tt3.getY() - y);
t.setRotate(r, x, y);
origin: apache/batik

  sb.append("null");
} else {
  SVGMatrix m = t.getMatrix();
  switch (t.getType()) {
    case SVGTransform.SVG_TRANSFORM_TRANSLATE:
      sb.append("translate(");
    case SVGTransform.SVG_TRANSFORM_SKEWX:
      sb.append("skewX(");
      sb.append(t.getAngle());
      sb.append(')');
      break;
    case SVGTransform.SVG_TRANSFORM_SKEWY:
      sb.append("skewY(");
      sb.append(t.getAngle());
      sb.append(')');
      break;
    case SVGTransform.SVG_TRANSFORM_ROTATE:
      sb.append("rotate(");
      sb.append(t.getAngle());
      sb.append(',');
      sb.append(t.getX());
      sb.append(',');
      sb.append(t.getY());
      sb.append(')');
      break;
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Returns the distance between this value's first component and the
 * specified other value's first component.
 */
public float distanceTo1(AnimatableValue other) {
  AnimatableTransformListValue o = (AnimatableTransformListValue) other;
  if (transforms.isEmpty() || o.transforms.isEmpty()) {
    return 0f;
  }
  AbstractSVGTransform t1 = (AbstractSVGTransform) transforms.lastElement();
  AbstractSVGTransform t2 = (AbstractSVGTransform) o.transforms.lastElement();
  short type1 = t1.getType();
  if (type1 != t2.getType()) {
    return 0f;
  }
  SVGMatrix m1 = t1.getMatrix();
  SVGMatrix m2 = t2.getMatrix();
  switch (type1) {
    case SVGTransform.SVG_TRANSFORM_TRANSLATE:
      return Math.abs(m1.getE() - m2.getE());
    case SVGTransform.SVG_TRANSFORM_SCALE:
      return Math.abs(m1.getA() - m2.getA());
    case SVGTransform.SVG_TRANSFORM_ROTATE:
    case SVGTransform.SVG_TRANSFORM_SKEWX:
    case SVGTransform.SVG_TRANSFORM_SKEWY:
      return Math.abs(t1.getAngle() - t2.getAngle());
  }
  return 0f;
}
origin: apache/batik

  AbstractSVGTransform internal =
    (AbstractSVGTransform) transform;
  setRotate(internal.getAngle(),
       internal.getX(), internal.getY());
} else {
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Returns the distance between this value's second component and the
 * specified other value's second component.
 */
public float distanceTo2(AnimatableValue other) {
  AnimatableTransformListValue o = (AnimatableTransformListValue) other;
  if (transforms.isEmpty() || o.transforms.isEmpty()) {
    return 0f;
  }
  AbstractSVGTransform t1 = (AbstractSVGTransform) transforms.lastElement();
  AbstractSVGTransform t2 = (AbstractSVGTransform) o.transforms.lastElement();
  short type1 = t1.getType();
  if (type1 != t2.getType()) {
    return 0f;
  }
  SVGMatrix m1 = t1.getMatrix();
  SVGMatrix m2 = t2.getMatrix();
  switch (type1) {
    case SVGTransform.SVG_TRANSFORM_TRANSLATE:
      return Math.abs(m1.getF() - m2.getF());
    case SVGTransform.SVG_TRANSFORM_SCALE:
      return Math.abs(m1.getD() - m2.getD());
    case SVGTransform.SVG_TRANSFORM_ROTATE:
      return Math.abs(t1.getX() - t2.getX());
  }
  return 0f;
}
origin: apache/batik

/**
 * <b>DOM</b>: Implements {@link SVGTransform#setTranslate(float,float)}.
 */
public void setTranslate(float tx, float ty) {
  super.setTranslate(tx, ty);
  resetAttribute();
}
org.apache.batik.dom.svgAbstractSVGTransform

Javadoc

Abstract implementation of SVGTransform.

Most used methods

  • getAngle
    DOM: Implements SVGTransform#getAngle().
  • getX
    Returns the x coordinate of the center of the rotation, if this transformation is a rotation.
  • getY
    Returns the y coordinate of the center of the rotation, if this transformation is a rotation.
  • setRotate
    DOM: Implements SVGTransform#setRotate(float,float,float).
  • setScale
    DOM: Implements SVGTransform#setScale(float,float).
  • setSkewX
    DOM: Implements SVGTransform#setSkewX(float).
  • setSkewY
    DOM: Implements SVGTransform#setSkewY(float).
  • setTranslate
    DOM: Implements SVGTransform#setTranslate(float,float).
  • assign
    Copies the value of the specified transformation into this object.
  • createMatrix
    Creates and returns a new SVGMatrix for exposing the transformation as a matrix.
  • getMatrix
    DOM: Implements SVGTransform#getMatrix().
  • getType
    DOM: Implements SVGTransform#getType().
  • getMatrix,
  • getType,
  • setMatrix

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
  • setContentView (Activity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • JCheckBox (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • 14 Best Plugins for Eclipse
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