Codota Logo
TransformStackElement
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: org.apache.xmlgraphics/batik-awt-util

/**
 * @return true iff this transform is the identity transform
 */
public boolean isIdentity() {
  return isIdentity(transformParameters);
}
origin: apache/batik

/**
 * Composes an <code>AffineTransform</code> object with the
 * <code>Transform</code> in this <code>Graphics2D</code> according
 * to the rule last-specified-first-applied.  If the current
 * <code>Transform</code> is Cx, the result of composition
 * with Tx is a new <code>Transform</code> Cx'.  Cx' becomes the
 * current <code>Transform</code> for this <code>Graphics2D</code>.
 * Transforming a point p by the updated <code>Transform</code> Cx' is
 * equivalent to first transforming p by Tx and then transforming
 * the result by the original <code>Transform</code> Cx.  In other
 * words, Cx'(p) = Cx(Tx(p)).  A copy of the Tx is made, if necessary,
 * so further modifications to Tx do not affect rendering.
 * @param Tx the <code>AffineTransform</code> object to be composed with
 * the current <code>Transform</code>
 * @see #setTransform
 * @see AffineTransform
 */
public void transform(AffineTransform Tx){
  transform.concatenate(Tx);
  transformStack.add(TransformStackElement.createGeneralTransformElement(Tx));
}
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: apache/batik

double[] transformParameters = transformElement.getTransformParameters();
switch(transformElement.getType().toInt()){
case TransformType.TRANSFORM_TRANSLATE:
  if(!transformElement.isIdentity()) {
    transformString.append(TRANSFORM_TRANSLATE);
    transformString.append(OPEN_PARENTHESIS);
  if(!transformElement.isIdentity()) {
    transformString.append(TRANSFORM_ROTATE);
    transformString.append(OPEN_PARENTHESIS);
  if(!transformElement.isIdentity()) {
    transformString.append(TRANSFORM_SCALE);
    transformString.append(OPEN_PARENTHESIS);
  if(!transformElement.isIdentity()) {
    transformString.append(TRANSFORM_MATRIX);
    transformString.append(OPEN_PARENTHESIS);
  if(!transformElement.isIdentity()) {
    transformString.append(TRANSFORM_MATRIX);
    transformString.append(OPEN_PARENTHESIS);
origin: apache/batik

element = (TransformStackElement) transformStack[i].clone();
next++;
canConcatenate = element.concatenate(transformStack[j]);
if(!canConcatenate)
  break;
origin: fr.avianey.apache-xmlgraphics/batik

TransformStackElement stackElement =
  (TransformStackElement)this.transformStack.get(i);
copyGc.transformStack.add(stackElement.clone());
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

/**
 * Concatenates the current <code>Graphics2D</code>
 * <code>Transform</code> with a rotation transform.
 * Subsequent rendering is rotated by the specified radians relative
 * to the previous origin.
 * This is equivalent to calling <code>transform(R)</code>, where R is an
 * <code>AffineTransform</code> represented by the following matrix:
 * <pre>
 *          [   cos(theta)    -sin(theta)    0   ]
 *          [   sin(theta)     cos(theta)    0   ]
 *          [       0              0         1   ]
 * </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
 */
public void rotate(double theta){
  transform.rotate(theta);
  transformStack.add(TransformStackElement.createRotateElement(theta));
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Concatenates the current <code>Graphics2D</code>
 * <code>Transform</code> with a shearing transform.
 * Subsequent renderings are sheared by the specified
 * multiplier relative to the previous position.
 * This is equivalent to calling <code>transform(SH)</code>, where SH
 * is an <code>AffineTransform</code> represented by the following
 * matrix:
 * <pre>
 *          [   1   shx   0   ]
 *          [  shy   1    0   ]
 *          [   0    0    1   ]
 * </pre>
 * @param shx the multiplier by which coordinates are shifted in
 * the positive X axis direction as a function of their Y coordinate
 * @param shy the multiplier by which coordinates are shifted in
 * the positive Y axis direction as a function of their X coordinate
 */
public void shear(double shx, double shy){
  transform.shear(shx, shy);
  transformStack.add(TransformStackElement.createShearElement(shx, shy));
}
origin: org.apache.xmlgraphics/batik-awt-util

/**
 * Concatenates the current <code>Graphics2D</code>
 * <code>Transform</code> with a scaling transformation
 * Subsequent rendering is resized according to the specified scaling
 * factors relative to the previous scaling.
 * This is equivalent to calling <code>transform(S)</code>, where S is an
 * <code>AffineTransform</code> represented by the following matrix:
 * <pre>
 *          [   sx   0    0   ]
 *          [   0    sy   0   ]
 *          [   0    0    1   ]
 * </pre>
 * @param sx the amount by which X coordinates in subsequent
 * rendering operations are multiplied relative to previous
 * rendering operations.
 * @param sy the amount by which Y coordinates in subsequent
 * rendering operations are multiplied relative to previous
 * rendering operations.
 */
public void scale(double sx, double sy){
  transform.scale(sx, sy);
  transformStack.add(TransformStackElement.createScaleElement(sx, sy));
}
origin: fr.avianey.apache-xmlgraphics/batik

double[] transformParameters = transformElement.getTransformParameters();
switch(transformElement.getType().toInt()){
case TransformType.TRANSFORM_TRANSLATE:
  if(!transformElement.isIdentity()) {
    transformString.append(TRANSFORM_TRANSLATE);
    transformString.append(OPEN_PARENTHESIS);
  if(!transformElement.isIdentity()) {
    transformString.append(TRANSFORM_ROTATE);
    transformString.append(OPEN_PARENTHESIS);
  if(!transformElement.isIdentity()) {
    transformString.append(TRANSFORM_SCALE);
    transformString.append(OPEN_PARENTHESIS);
  if(!transformElement.isIdentity()) {
    transformString.append(TRANSFORM_MATRIX);
    transformString.append(OPEN_PARENTHESIS);
  if(!transformElement.isIdentity()) {
    transformString.append(TRANSFORM_MATRIX);
    transformString.append(OPEN_PARENTHESIS);
origin: fr.avianey.apache-xmlgraphics/batik

element = (TransformStackElement) transformStack[i].clone();
next++;
canConcatenate = element.concatenate(transformStack[j]);
if(!canConcatenate)
  break;
origin: apache/batik

TransformStackElement stackElement =
  (TransformStackElement)this.transformStack.get(i);
copyGc.transformStack.add(stackElement.clone());
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: fr.avianey.apache-xmlgraphics/batik

/**
 * Concatenates the current <code>Graphics2D</code>
 * <code>Transform</code> with a rotation transform.
 * Subsequent rendering is rotated by the specified radians relative
 * to the previous origin.
 * This is equivalent to calling <code>transform(R)</code>, where R is an
 * <code>AffineTransform</code> represented by the following matrix:
 * <pre>
 *          [   cos(theta)    -sin(theta)    0   ]
 *          [   sin(theta)     cos(theta)    0   ]
 *          [       0              0         1   ]
 * </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
 */
public void rotate(double theta){
  transform.rotate(theta);
  transformStack.add(TransformStackElement.createRotateElement(theta));
}
origin: org.apache.xmlgraphics/batik-awt-util

/**
 * Concatenates the current <code>Graphics2D</code>
 * <code>Transform</code> with a shearing transform.
 * Subsequent renderings are sheared by the specified
 * multiplier relative to the previous position.
 * This is equivalent to calling <code>transform(SH)</code>, where SH
 * is an <code>AffineTransform</code> represented by the following
 * matrix:
 * <pre>
 *          [   1   shx   0   ]
 *          [  shy   1    0   ]
 *          [   0    0    1   ]
 * </pre>
 * @param shx the multiplier by which coordinates are shifted in
 * the positive X axis direction as a function of their Y coordinate
 * @param shy the multiplier by which coordinates are shifted in
 * the positive Y axis direction as a function of their X coordinate
 */
public void shear(double shx, double shy){
  transform.shear(shx, shy);
  transformStack.add(TransformStackElement.createShearElement(shx, shy));
}
origin: apache/batik

/**
 * Concatenates the current <code>Graphics2D</code>
 * <code>Transform</code> with a scaling transformation
 * Subsequent rendering is resized according to the specified scaling
 * factors relative to the previous scaling.
 * This is equivalent to calling <code>transform(S)</code>, where S is an
 * <code>AffineTransform</code> represented by the following matrix:
 * <pre>
 *          [   sx   0    0   ]
 *          [   0    sy   0   ]
 *          [   0    0    1   ]
 * </pre>
 * @param sx the amount by which X coordinates in subsequent
 * rendering operations are multiplied relative to previous
 * rendering operations.
 * @param sy the amount by which Y coordinates in subsequent
 * rendering operations are multiplied relative to previous
 * rendering operations.
 */
public void scale(double sx, double sy){
  transform.scale(sx, sy);
  transformStack.add(TransformStackElement.createScaleElement(sx, sy));
}
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: fr.avianey.apache-xmlgraphics/batik

/**
 * @return true iff this transform is the identity transform
 */
public boolean isIdentity() {
  return isIdentity(transformParameters);
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Composes an <code>AffineTransform</code> object with the
 * <code>Transform</code> in this <code>Graphics2D</code> according
 * to the rule last-specified-first-applied.  If the current
 * <code>Transform</code> is Cx, the result of composition
 * with Tx is a new <code>Transform</code> Cx'.  Cx' becomes the
 * current <code>Transform</code> for this <code>Graphics2D</code>.
 * Transforming a point p by the updated <code>Transform</code> Cx' is
 * equivalent to first transforming p by Tx and then transforming
 * the result by the original <code>Transform</code> Cx.  In other
 * words, Cx'(p) = Cx(Tx(p)).  A copy of the Tx is made, if necessary,
 * so further modifications to Tx do not affect rendering.
 * @param Tx the <code>AffineTransform</code> object to be composed with
 * the current <code>Transform</code>
 * @see #setTransform
 * @see AffineTransform
 */
public void transform(AffineTransform Tx){
  transform.concatenate(Tx);
  transformStack.add(TransformStackElement.createGeneralTransformElement(Tx));
}
org.apache.batik.ext.awt.g2dTransformStackElement

Javadoc

Contains a description of an elementary transform stack element, such as a rotate or translate. A transform stack element has a type and a value, which is an array of double values.

Most used methods

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

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now