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

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

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

AffineTransform.invert介绍

暂无

代码示例

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

if (!at.isIdentity())
  at.invert();
  cs.transform(new Matrix(at));

代码示例来源:origin: org.apache.sis.core/sis-referencing

/**
   * Checks for {@linkplain #checkPermission() permission} before inverting this transform.
   *
   * @throws java.awt.geom.NoninvertibleTransformException if the matrix can not be inverted.
   */
  @Override
  public final void invert() throws NoninvertibleTransformException {
    checkPermission();
    super.invert();
  }
}

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

/**
   * Checks for {@linkplain #checkPermission() permission} before inverting this transform.
   *
   * @throws java.awt.geom.NoninvertibleTransformException if the matrix can not be inverted.
   */
  @Override
  public final void invert() throws NoninvertibleTransformException {
    checkPermission();
    super.invert();
  }
}

代码示例来源:origin: org.geoserver.community/gs-vectortiles

public TopologyBuilder(Rectangle mapSize, ReferencedEnvelope mapArea) {
  this.worldToScreen = RendererUtilities.worldToScreenTransform(mapArea, mapSize);
  this.screenToWorld = new AffineTransform(this.worldToScreen);
  try {
    this.screenToWorld.invert();
  } catch (NoninvertibleTransformException e) {
    throw Throwables.propagate(e);
  }
  PrecisionModel precisionModel = new PrecisionModel(10.0);
  fixedGeometryFactory = new GeometryFactory(precisionModel);
}

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

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

代码示例来源:origin: org.geoserver.extension/gs-vectortiles

public TopologyBuilder(Rectangle mapSize, ReferencedEnvelope mapArea) {
  this.worldToScreen = RendererUtilities.worldToScreenTransform(mapArea, mapSize);
  this.screenToWorld = new AffineTransform(this.worldToScreen);
  try {
    this.screenToWorld.invert();
  } catch (NoninvertibleTransformException e) {
    throw Throwables.propagate(e);
  }
  PrecisionModel precisionModel = new PrecisionModel(10.0);
  fixedGeometryFactory = new GeometryFactory(precisionModel);
}

代码示例来源:origin: openstreetmap/osmembrane

/**
 * Zooms temporary (in the current display transformation).
 * 
 * @param objCenter
 *            center of the zooming operation in object space
 * @param factor
 *            zooming value. if < 1 zooms out, if > 1 zooms in
 */
public void zoomTemp(Point2D objCenter, double factor) {
  AffineTransform objectToWindowInverse = new AffineTransform(
      objectToWindow);
  try {
    objectToWindowInverse.invert();
  } catch (NoninvertibleTransformException e) {
    Application.handleException(e);
  }
  currentDisplay.setToIdentity();
  currentDisplay.concatenate(objectToWindow);
  currentDisplay.translate(+objCenter.getX(), +objCenter.getY());
  currentDisplay.scale(factor, factor);
  currentDisplay.translate(-objCenter.getX(), -objCenter.getY());
  currentDisplay.concatenate(objectToWindowInverse);
  arrange(true);
  repaint();
}

代码示例来源:origin: openstreetmap/osmembrane

/**
 * Translates window delta coordinates to object delta coordinates. Typical
 * delta coordinates are object sizes.
 * 
 * @param windowDelta
 *            window delta coordinates
 * @return windowDelta in object delta coordinates
 */
private Point2D windowToObjDelta(Point windowDelta) {
  Point2D result = new Point2D.Double();
  try {
    AffineTransform temp = new AffineTransform(objectToWindow);
    temp.preConcatenate(currentDisplay);
    temp.invert();
    temp.deltaTransform(windowDelta, result);
  } catch (NoninvertibleTransformException e) {
    Application.handleException(e);
  }
  return result;
}

代码示例来源:origin: stackoverflow.com

at.invert();

代码示例来源:origin: sc.fiji/Reconstruct_Reader

at.invert();

代码示例来源:origin: stackoverflow.com

fromAncestor.invert(); // from ancestor space

代码示例来源:origin: stackoverflow.com

try {
  paintXfrm = g2d.getTransform();
  paintXfrm.invert();
  g2d.translate(getWidth() / 2, getHeight() / 2);
  g2d.transform(xfrm);

代码示例来源:origin: graphstream/gs-core

xT = new AffineTransform(Tx);
try {
  xT.invert();
} catch (NoninvertibleTransformException e) {
  logger.log(Level.WARNING, "Cannot inverse gu2px matrix.", e);

代码示例来源:origin: org.graphstream/gs-core

xT = new AffineTransform(Tx);
try {
  xT.invert();
} catch (NoninvertibleTransformException e) {
  logger.log(Level.WARNING, "Cannot inverse gu2px matrix.", e);

代码示例来源:origin: graphstream/gs-core

xT = new AffineTransform(Tx);
try {
  xT.invert();
} catch (NoninvertibleTransformException e) {
  logger.warning("Cannot inverse gu2px matrix.");

代码示例来源:origin: org.graphstream/gs-core

xT = new AffineTransform(Tx);
try {
  xT.invert();
} catch (NoninvertibleTransformException e) {
  logger.warning("Cannot inverse gu2px matrix.");

代码示例来源:origin: stackoverflow.com

try { trans.invert(); }
catch(NoninvertibleTransformException ex){ return NO_SUCH_PAGE; }
Point2D p=trans.transform(new Point2D.Float(bounds.width, bounds.height),null);

代码示例来源:origin: stackoverflow.com

try
  at.invert();

代码示例来源:origin: sc.fiji/TrakEM2_

final AffineTransform aiInverse = new AffineTransform( ai );
try {
  aiInverse.invert();
} catch ( final NoninvertibleTransformException x ) {}
aiInverse.transform( f, 0, f, 0, 1 );

代码示例来源:origin: bcdev/beam

public VectorDataMaskOpImage(VectorDataNode vectorDataNode, ResolutionLevel level) {
  super(DataBuffer.TYPE_BYTE,
     vectorDataNode.getProduct().getSceneRasterWidth(),
     vectorDataNode.getProduct().getSceneRasterHeight(),
     vectorDataNode.getProduct().getPreferredTileSize(),
     null,
     level);
  this.vectorDataNode = vectorDataNode;
  GeoCoding geoCoding = vectorDataNode.getProduct().getGeoCoding();
  AffineTransform transform = ImageManager.getImageToModelTransform(geoCoding);
  try {
    transform.invert();
    m2iTransform = transform;
  } catch (NoninvertibleTransformException e) {
    throw new IllegalArgumentException("Could not invert model-to-image transformation.", e);
  }
}

相关文章