Tabnine Logo
TransformStackElement.createTranslateElement
Code IndexAdd Tabnine to your IDE (free)

How to use
createTranslateElement
method
in
org.apache.batik.ext.awt.g2d.TransformStackElement

Best Java code snippets using org.apache.batik.ext.awt.g2d.TransformStackElement.createTranslateElement (Showing top 9 results out of 315)

origin: apache/batik

/**
 * Translates the origin of the graphics context to the point
 * (<i>x</i>,&nbsp;<i>y</i>) in the current coordinate system.
 * Modifies this graphics context so that its new origin corresponds
 * to the point (<i>x</i>,&nbsp;<i>y</i>) in this graphics context's
 * original coordinate system.  All coordinates used in subsequent
 * rendering operations on this graphics context will be relative
 * to this new origin.
 * @param  x   the <i>x</i> coordinate.
 * @param  y   the <i>y</i> coordinate.
 */
public void translate(int x, int y){
  if(x!=0 || y!=0){
    transform.translate(x, y);
    transformStack.add(TransformStackElement.createTranslateElement(x, y));
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Translates the origin of the graphics context to the point
 * (<i>x</i>,&nbsp;<i>y</i>) in the current coordinate system.
 * Modifies this graphics context so that its new origin corresponds
 * to the point (<i>x</i>,&nbsp;<i>y</i>) in this graphics context's
 * original coordinate system.  All coordinates used in subsequent
 * rendering operations on this graphics context will be relative
 * to this new origin.
 * @param  x   the <i>x</i> coordinate.
 * @param  y   the <i>y</i> coordinate.
 */
public void translate(int x, int y){
  if(x!=0 || y!=0){
    transform.translate(x, y);
    transformStack.add(TransformStackElement.createTranslateElement(x, y));
  }
}
origin: org.apache.xmlgraphics/batik-awt-util

/**
 * Translates the origin of the graphics context to the point
 * (<i>x</i>,&nbsp;<i>y</i>) in the current coordinate system.
 * Modifies this graphics context so that its new origin corresponds
 * to the point (<i>x</i>,&nbsp;<i>y</i>) in this graphics context's
 * original coordinate system.  All coordinates used in subsequent
 * rendering operations on this graphics context will be relative
 * to this new origin.
 * @param  x   the <i>x</i> coordinate.
 * @param  y   the <i>y</i> coordinate.
 */
public void translate(int x, int y){
  if(x!=0 || y!=0){
    transform.translate(x, y);
    transformStack.add(TransformStackElement.createTranslateElement(x, y));
  }
}
origin: apache/batik

/**
 * Concatenates the current
 * <code>Graphics2D</code> <code>Transform</code>
 * with a translation transform.
 * Subsequent rendering is translated by the specified
 * distance relative to the previous position.
 * This is equivalent to calling transform(T), where T is an
 * <code>AffineTransform</code> represented by the following matrix:
 * <pre>
 *          [   1    0    tx  ]
 *          [   0    1    ty  ]
 *          [   0    0    1   ]
 * </pre>
 * @param tx the distance to translate along the x-axis
 * @param ty the distance to translate along the y-axis
 */
public void translate(double tx, double ty){
  transform.translate(tx, ty);
  transformStack.add(TransformStackElement.createTranslateElement(tx, ty));
}
origin: org.apache.xmlgraphics/batik-awt-util

/**
 * Concatenates the current
 * <code>Graphics2D</code> <code>Transform</code>
 * with a translation transform.
 * Subsequent rendering is translated by the specified
 * distance relative to the previous position.
 * This is equivalent to calling transform(T), where T is an
 * <code>AffineTransform</code> represented by the following matrix:
 * <pre>
 *          [   1    0    tx  ]
 *          [   0    1    ty  ]
 *          [   0    0    1   ]
 * </pre>
 * @param tx the distance to translate along the x-axis
 * @param ty the distance to translate along the y-axis
 */
public void translate(double tx, double ty){
  transform.translate(tx, ty);
  transformStack.add(TransformStackElement.createTranslateElement(tx, ty));
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Concatenates the current
 * <code>Graphics2D</code> <code>Transform</code>
 * with a translation transform.
 * Subsequent rendering is translated by the specified
 * distance relative to the previous position.
 * This is equivalent to calling transform(T), where T is an
 * <code>AffineTransform</code> represented by the following matrix:
 * <pre>
 *          [   1    0    tx  ]
 *          [   0    1    ty  ]
 *          [   0    0    1   ]
 * </pre>
 * @param tx the distance to translate along the x-axis
 * @param ty the distance to translate along the y-axis
 */
public void translate(double tx, double ty){
  transform.translate(tx, ty);
  transformStack.add(TransformStackElement.createTranslateElement(tx, ty));
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Concatenates the current <code>Graphics2D</code>
 * <code>Transform</code> with a translated rotation
 * transform.  Subsequent rendering is transformed by a transform
 * which is constructed by translating to the specified location,
 * rotating by the specified radians, and translating back by the same
 * amount as the original translation.  This is equivalent to the
 * following sequence of calls:
 * <pre>
 *          translate(x, y);
 *          rotate(theta);
 *          translate(-x, -y);
 * </pre>
 * Rotating with a positive angle theta rotates points on the positive
 * x axis toward the positive y axis.
 * @param theta the angle of rotation in radians
 * @param x x coordinate of the origin of the rotation
 * @param y y coordinate of the origin of the rotation
 */
public void rotate(double theta, double x, double y){
  transform.rotate(theta, x, y);
  transformStack.add(TransformStackElement.createTranslateElement(x, y));
  transformStack.add(TransformStackElement.createRotateElement(theta));
  transformStack.add(TransformStackElement.createTranslateElement(-x, -y));
}
origin: org.apache.xmlgraphics/batik-awt-util

/**
 * Concatenates the current <code>Graphics2D</code>
 * <code>Transform</code> with a translated rotation
 * transform.  Subsequent rendering is transformed by a transform
 * which is constructed by translating to the specified location,
 * rotating by the specified radians, and translating back by the same
 * amount as the original translation.  This is equivalent to the
 * following sequence of calls:
 * <pre>
 *          translate(x, y);
 *          rotate(theta);
 *          translate(-x, -y);
 * </pre>
 * Rotating with a positive angle theta rotates points on the positive
 * x axis toward the positive y axis.
 * @param theta the angle of rotation in radians
 * @param x x coordinate of the origin of the rotation
 * @param y y coordinate of the origin of the rotation
 */
public void rotate(double theta, double x, double y){
  transform.rotate(theta, x, y);
  transformStack.add(TransformStackElement.createTranslateElement(x, y));
  transformStack.add(TransformStackElement.createRotateElement(theta));
  transformStack.add(TransformStackElement.createTranslateElement(-x, -y));
}
origin: apache/batik

/**
 * Concatenates the current <code>Graphics2D</code>
 * <code>Transform</code> with a translated rotation
 * transform.  Subsequent rendering is transformed by a transform
 * which is constructed by translating to the specified location,
 * rotating by the specified radians, and translating back by the same
 * amount as the original translation.  This is equivalent to the
 * following sequence of calls:
 * <pre>
 *          translate(x, y);
 *          rotate(theta);
 *          translate(-x, -y);
 * </pre>
 * Rotating with a positive angle theta rotates points on the positive
 * x axis toward the positive y axis.
 * @param theta the angle of rotation in radians
 * @param x x coordinate of the origin of the rotation
 * @param y y coordinate of the origin of the rotation
 */
public void rotate(double theta, double x, double y){
  transform.rotate(theta, x, y);
  transformStack.add(TransformStackElement.createTranslateElement(x, y));
  transformStack.add(TransformStackElement.createRotateElement(theta));
  transformStack.add(TransformStackElement.createTranslateElement(-x, -y));
}
org.apache.batik.ext.awt.g2dTransformStackElementcreateTranslateElement

Popular methods of TransformStackElement

  • clone
  • isIdentity
  • concatenate
  • createGeneralTransformElement
  • createRotateElement
  • createScaleElement
  • createShearElement
  • getTransformParameters
  • getType
  • matrixMultiply
    Multiplies two 2x3 matrices of double precision values

Popular in Java

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • String (java.lang)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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