java.awt.geom.AffineTransform.preConcatenate()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(175)

本文整理了Java中java.awt.geom.AffineTransform.preConcatenate()方法的一些代码示例,展示了AffineTransform.preConcatenate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AffineTransform.preConcatenate()方法的具体详情如下:
包路径:java.awt.geom.AffineTransform
类名称:AffineTransform
方法名:preConcatenate

AffineTransform.preConcatenate介绍

暂无

代码示例

代码示例来源:origin: nodebox/nodebox

public void prepend(Transform t) {
  affineTransform.preConcatenate(t.affineTransform);
}

代码示例来源:origin: dermotte/LIRE

public void preConcatenate(TRModel2D model) {
  this.affine.preConcatenate(model.affine);
}

代码示例来源:origin: dermotte/LIRE

public void preConcatenate(TRModel2D model) {
  this.affine.preConcatenate(model.affine);
}

代码示例来源:origin: geotools/geotools

/** Checks for {@linkplain #checkPermission permission} before concatenating this transform. */
@Override
public void preConcatenate(AffineTransform Tx) {
  checkPermission();
  super.preConcatenate(Tx);
}

代码示例来源:origin: geotools/geotools

public Level(final double scaleX, final double scaleY, final int width, final int height) {
  this.scaleX = scaleX;
  this.scaleY = scaleY;
  this.baseToLevelTransform =
      new AffineTransform2D(XAffineTransform.getScaleInstance(scaleX, scaleY, 0, 0));
  final AffineTransform gridToWorldTransform_ = new AffineTransform(baseToLevelTransform);
  gridToWorldTransform_.preConcatenate(CoverageUtilities.CENTER_TO_CORNER);
  gridToWorldTransform_.preConcatenate(baseGridToWorld);
  this.gridToWorldTransform = new AffineTransform2D(gridToWorldTransform_);
  this.width = width;
  this.height = height;
  this.rasterDimensions = new Rectangle(0, 0, width, height);
}

代码示例来源:origin: geotools/geotools

public GranuleOverviewLevelDescriptor(
    final double scaleX, final double scaleY, final int width, final int height) {
  this.scaleX = scaleX;
  this.scaleY = scaleY;
  this.baseToLevelTransform =
      new AffineTransform2D(XAffineTransform.getScaleInstance(scaleX, scaleY, 0, 0));
  final AffineTransform gridToWorldTransform_ = new AffineTransform(baseToLevelTransform);
  gridToWorldTransform_.preConcatenate(CoverageUtilities.CENTER_TO_CORNER);
  gridToWorldTransform_.preConcatenate(baseGridToWorld);
  this.gridToWorldTransformCorner = new AffineTransform2D(gridToWorldTransform_);
  this.width = width;
  this.height = height;
  this.rasterDimensions = new Rectangle(0, 0, width, height);
}

代码示例来源:origin: apache/pdfbox

private BufferedImage adjustImage(BufferedImage gray) throws IOException
{
  AffineTransform at = new AffineTransform(xform);
  Matrix m = new Matrix(at);
  at.scale(1.0 / Math.abs(m.getScalingFactorX()), 1.0 / Math.abs(m.getScalingFactorY()));
  Rectangle originalBounds = new Rectangle(gray.getWidth(), gray.getHeight());
  Rectangle2D transformedBounds = at.createTransformedShape(originalBounds).getBounds2D();
  at.preConcatenate(AffineTransform.getTranslateInstance(-transformedBounds.getMinX(), 
      -transformedBounds.getMinY()));
  
  int width = (int) Math.ceil(transformedBounds.getWidth());
  int height = (int) Math.ceil(transformedBounds.getHeight());
  BufferedImage transformedGray = new BufferedImage(width, height, BufferedImage.TYPE_BYTE_GRAY); 
  
  Graphics2D g2 = (Graphics2D) transformedGray.getGraphics();
  g2.drawImage(gray, at, null);
  g2.dispose();
  return transformedGray;
}

代码示例来源:origin: nodebox/nodebox

private AffineTransform fullTransform(Rect bounds) {
  double cx = bounds.getX() + bounds.getWidth() / 2;
  double cy = bounds.getY() + bounds.getHeight() / 2;
  AffineTransform t = new AffineTransform();
  t.translate(cx, cy);
  t.preConcatenate(affineTransform);
  t.translate(-cx, -cy);
  return t;
}

代码示例来源:origin: geotools/geotools

modifiedRasterToModel.preConcatenate(CoverageUtilities.AXES_SWAP);

代码示例来源:origin: geotools/geotools

gridToWorldTransform_.preConcatenate(CoverageUtilities.CENTER_TO_CORNER);
gridToWorldTransform_.preConcatenate(baseGridToWorld);
AffineTransform2D cropWorldToGrid = new AffineTransform2D(gridToWorldTransform_);
cropWorldToGrid = (AffineTransform2D) cropWorldToGrid.inverse();
finalRaster2Model.preConcatenate((AffineTransform) mosaicWorldToGrid);

代码示例来源:origin: haraldk/TwelveMonkeys

Px.preConcatenate(Mx);
curAOI = aoi;

代码示例来源:origin: geotools/geotools

finalRaster2Model.preConcatenate((AffineTransform) worldToGrid);

代码示例来源:origin: geotools/geotools

mutableTransform.preConcatenate((AffineTransform) destinationToSourceTransform);

代码示例来源:origin: geotools/geotools

finalRaster2Model.preConcatenate(finalWorldToGridCorner);
RasterLayerRequest request = rasterLayerResponse.getRequest();
final Interpolation interpolation = request.getInterpolation();

代码示例来源:origin: geotools/geotools

finalRaster2Model.preConcatenate((AffineTransform) mosaicWorldToGrid);
final Interpolation interpolation = request.getInterpolation();

代码示例来源:origin: geotools/geotools

mutableTransform.preConcatenate((AffineTransform) destinationToSourceTransform);

代码示例来源:origin: geotools/geotools

final AffineTransform newTr =
    new AffineTransform(xScale, 0, 0, yScale, xTrans, yTrans);
newTr.preConcatenate((AffineTransform) this.cornerToCRS);
this.cornerToCRS = ProjectiveTransform.create(newTr);

代码示例来源:origin: geotools/geotools

mutableTransform.preConcatenate((AffineTransform) destinationToSourceTransform);

代码示例来源:origin: jrtom/jung

public void preConcatenate(AffineTransform xform) {
 inverse = null;
 transform.preConcatenate(xform);
 fireStateChanged();
}

代码示例来源:origin: geotools/geotools

try {
  scaleTranslate.invert();
  scaleTranslate.preConcatenate(CoverageUtilities.CENTER_TO_CORNER);
  final AffineTransform2D tr = new AffineTransform2D(scaleTranslate);
  finalTransform =

相关文章