本文整理了Java中java.awt.geom.AffineTransform.clone()
方法的一些代码示例,展示了AffineTransform.clone()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AffineTransform.clone()
方法的具体详情如下:
包路径:java.awt.geom.AffineTransform
类名称:AffineTransform
方法名:clone
暂无
代码示例来源:origin: pentaho/pentaho-kettle
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 );
}
代码示例来源:origin: org.apache.poi/poi
public AffineTransform getTransform()
{
return (AffineTransform)getTrans().clone();
}
代码示例来源:origin: org.apache.poi/poi
public void setTransform(AffineTransform affinetransform)
{
setTrans( (AffineTransform)affinetransform.clone() );
}
代码示例来源:origin: org.apache.poi/poi
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;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* 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);
}
}
代码示例来源:origin: geotools/geotools
/** Returns a clone of this affine transform. */
@Override
public AffineTransform2D clone() {
return (AffineTransform2D) super.clone();
}
代码示例来源:origin: nodebox/nodebox
public Transform(Transform other) {
this.affineTransform = (AffineTransform) other.affineTransform.clone();
}
代码示例来源:origin: geotools/geotools
/**
* 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();
}
代码示例来源:origin: apache/pdfbox
/**
* 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);
}
代码示例来源:origin: apache/pdfbox
AffineTransform transform = (AffineTransform)graphics2D.getTransform().clone();
graphics2D.setBackground(Color.WHITE);
renderer.setSubsamplingAllowed(subsamplingAllowed);
代码示例来源:origin: apache/pdfbox
AffineTransform at = (AffineTransform) flip.clone();
at.concatenate(text.getTextMatrix().createAffineTransform());
AffineTransform at = (AffineTransform) flip.clone();
at.concatenate(text.getTextMatrix().createAffineTransform());
代码示例来源:origin: apache/pdfbox
AffineTransform shadingToDevice = (AffineTransform)xform.clone();
shadingToDevice.concatenate(matrix.createAffineTransform());
代码示例来源:origin: apache/pdfbox
AffineTransform shadingToDevice = (AffineTransform)xform.clone();
shadingToDevice.concatenate(matrix.createAffineTransform());
代码示例来源:origin: org.jfree/jfreesvg
/**
* 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();
}
代码示例来源:origin: geotools/geotools
(AffineTransform) requestedGridToWorld.clone();
mutableTransform.preConcatenate((AffineTransform) destinationToSourceTransform);
代码示例来源:origin: geotools/geotools
AffineTransform mutableTransform = (AffineTransform) requestedGridToWorld.clone();
mutableTransform.preConcatenate((AffineTransform) destinationToSourceTransform);
代码示例来源:origin: geotools/geotools
AffineTransform mutableTransform = (AffineTransform) requestedGridToWorld.clone();
mutableTransform.preConcatenate((AffineTransform) destinationToSourceTransform);
代码示例来源:origin: geotools/geotools
(AffineTransform) finalWorldToGrid.clone();
finalRasterTransformation.concatenate(finalGCgridToWorld);
代码示例来源:origin: danfickle/openhtmltopdf
/**
* 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;
}
代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik
/**
* 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);
}
}
内容来源于网络,如有侵权,请联系作者删除!