public void setTransform( float translationX, float translationY, int shadowsize, float magnification ) { // PDI-9953 - always use original GC's transform. AffineTransform transform = (AffineTransform) originalTransform.clone(); transform.translate( translationX + shadowsize * magnification, translationY + shadowsize * magnification ); transform.scale( magnification, magnification ); gc.setTransform( transform ); }
public AffineTransform getTransform() { return (AffineTransform)getTrans().clone(); }
public void setTransform(AffineTransform affinetransform) { setTrans( (AffineTransform)affinetransform.clone() ); }
public boolean drawImage(Image image, AffineTransform affinetransform, ImageObserver imageobserver) { AffineTransform affinetransform1 = (AffineTransform)getTrans().clone(); getTrans().concatenate(affinetransform); drawImage(image, 0, 0, imageobserver); setTrans( affinetransform1 ); return true; }
/** * The visitor will first visit this shape, then it's children * * This is useful because exceptions will be marked with the shapes as it * propagates up the shape hierarchy. */ public void visitShapes(ShapeVisitor visitor, AffineTransform tr, int level) { tr = (AffineTransform) tr.clone(); tr.concatenate(getParentTransform()); try { if (visitor.accept(this)) { visitor.visit(this, tr, level); } if (_shapes != null) { for (XDGFShape shape : _shapes) { shape.visitShapes(visitor, tr, level + 1); } } } catch (StopVisitingThisBranch e) { // intentionally empty } catch (POIXMLException e) { throw XDGFException.wrap(this.toString(), e); } }
/** Returns a clone of this affine transform. */ @Override public AffineTransform2D clone() { return (AffineTransform2D) super.clone(); }
public Transform(Transform other) { this.affineTransform = (AffineTransform) other.affineTransform.clone(); }
/** * Returns an affine transform for the whole grid. This transform is only an approximation for * this localization grid. It is fitted (like "curve fitting") to grid data using the "least * squares" method. * * @return A global affine transform as an approximation for the whole localization grid. */ public synchronized AffineTransform getAffineTransform() { if (global == null) { final double[] matrix = new double[6]; fitPlane(X_OFFSET, matrix); assert X_OFFSET == 0 : X_OFFSET; fitPlane(Y_OFFSET, matrix); assert Y_OFFSET == 1 : Y_OFFSET; global = new AffineTransform(matrix); } return (AffineTransform) global.clone(); }
/** * Not called in TexturePaint subclasses, which is why we wrap TexturePaint. */ @Override public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) { AffineTransform xformPattern = (AffineTransform)xform.clone(); // applies the pattern matrix with scaling removed AffineTransform patternNoScale = patternMatrix.createAffineTransform(); patternNoScale.scale(1 / patternMatrix.getScalingFactorX(), 1 / patternMatrix.getScalingFactorY()); xformPattern.concatenate(patternNoScale); return paint.createContext(cm, deviceBounds, userBounds, xformPattern, hints); }
AffineTransform transform = (AffineTransform)graphics2D.getTransform().clone(); graphics2D.setBackground(Color.WHITE); renderer.setSubsamplingAllowed(subsamplingAllowed);
AffineTransform shadingToDevice = (AffineTransform)xform.clone(); shadingToDevice.concatenate(matrix.createAffineTransform());
AffineTransform shadingToDevice = (AffineTransform)xform.clone(); shadingToDevice.concatenate(matrix.createAffineTransform());
/** * Returns a copy of the current transform. * * @return A copy of the current transform (never {@code null}). * * @see #setTransform(java.awt.geom.AffineTransform) */ @Override public AffineTransform getTransform() { return (AffineTransform) this.transform.clone(); }
(AffineTransform) requestedGridToWorld.clone(); mutableTransform.preConcatenate((AffineTransform) destinationToSourceTransform);
AffineTransform mutableTransform = (AffineTransform) requestedGridToWorld.clone(); mutableTransform.preConcatenate((AffineTransform) destinationToSourceTransform);
AffineTransform mutableTransform = (AffineTransform) requestedGridToWorld.clone(); mutableTransform.preConcatenate((AffineTransform) destinationToSourceTransform);
(AffineTransform) finalWorldToGrid.clone(); finalRasterTransformation.concatenate(finalGCgridToWorld);
/** * Creates an absolute transform in document coordinates. This is typically used to figure out what pages the box will * fall on. The <code>_parentCtm</code> may be null in case the parent layer uses the identity tranform. If it is not null * it will be cloned before use. */ public static AffineTransform createDocumentCoordinatesTransform(Box master, CssContext c, AffineTransform _parentCtm) { AffineTransform ctm = _parentCtm == null ? new AffineTransform() : (AffineTransform) _parentCtm.clone(); createTransform(c, master, null, ctm, TransformYOrigin.DOCUMENT_TOP, -1); return ctm; }
/** * Implements {@link SVGMatrix#skewY(float)}. */ public SVGMatrix skewY(float angleDeg ) { AffineTransform tr = (AffineTransform)getAffineTransform().clone(); tr.concatenate (AffineTransform.getShearInstance(0, Math.tan( Math.toRadians( angleDeg ) ) )); return new SVGOMMatrix(tr); } }