当前位置: 首页>>代码示例>>Java>>正文


Java NoninvertibleTransformException.getMessage方法代码示例

本文整理汇总了Java中java.awt.geom.NoninvertibleTransformException.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java NoninvertibleTransformException.getMessage方法的具体用法?Java NoninvertibleTransformException.getMessage怎么用?Java NoninvertibleTransformException.getMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.awt.geom.NoninvertibleTransformException的用法示例。


在下文中一共展示了NoninvertibleTransformException.getMessage方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setTransform

import java.awt.geom.NoninvertibleTransformException; //导入方法依赖的package包/类
/**
 * Sets the transform of this node.
 *
 * @param newTransform the new transform of this node
 */
public void setTransform(AffineTransform newTransform) {
    fireGraphicsNodeChangeStarted();
    this.transform = newTransform;
    if(transform.getDeterminant() != 0){
        try{
            inverseTransform = transform.createInverse();
        }catch(NoninvertibleTransformException e){
            // Should never happen.
            throw new Error( e.getMessage() );
        }
    } else {
        // The transform is not invertible. Use the same
        // transform.
        inverseTransform = transform;
    }
    if (parent != null)
        parent.invalidateGeometryCache();
    fireGraphicsNodeChangeCompleted();
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:25,代码来源:AbstractGraphicsNode.java

示例2: setPositionTransform

import java.awt.geom.NoninvertibleTransformException; //导入方法依赖的package包/类
public void setPositionTransform(AffineTransform at) {
    fireGraphicsNodeChangeStarted();
    invalidateGeometryCache();
    this.positionTransform = at;
    if (positionTransform != null) {
        transform = new AffineTransform(positionTransform);
        if (viewingTransform != null)
            transform.concatenate(viewingTransform);
    } else if (viewingTransform != null)
        transform = new AffineTransform(viewingTransform);
    else
        transform = new AffineTransform();

    if (transform.getDeterminant() != 0){
        try{
            inverseTransform = transform.createInverse();
        }catch(NoninvertibleTransformException e){
            // Should never happen.
            throw new Error( e.getMessage() );
        }
    }
    else{
        // The transform is not invertible. Use the same
        // transform.
        inverseTransform = transform;
    }
    fireGraphicsNodeChangeCompleted();
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:29,代码来源:CanvasGraphicsNode.java

示例3: setViewingTransform

import java.awt.geom.NoninvertibleTransformException; //导入方法依赖的package包/类
public void setViewingTransform(AffineTransform at) {
    fireGraphicsNodeChangeStarted();
    invalidateGeometryCache();
    this.viewingTransform = at;
    if (positionTransform != null) {
        transform = new AffineTransform(positionTransform);
        if (viewingTransform != null)
            transform.concatenate(viewingTransform);
    } else if (viewingTransform != null)
        transform = new AffineTransform(viewingTransform);
    else
        transform = new AffineTransform();

    if(transform.getDeterminant() != 0){
        try{
            inverseTransform = transform.createInverse();
        }catch(NoninvertibleTransformException e){
            // Should never happen.
            throw new Error( e.getMessage() );
        }
    }
    else{
        // The transform is not invertible. Use the same
        // transform.
        inverseTransform = transform;
    }
    fireGraphicsNodeChangeCompleted();
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:29,代码来源:CanvasGraphicsNode.java

示例4: inverse

import java.awt.geom.NoninvertibleTransformException; //导入方法依赖的package包/类
/**
 * Implements {@link SVGMatrix#inverse()}.
 */
public SVGMatrix inverse() throws SVGException {
    try {
        return new SVGOMMatrix(getAffineTransform().createInverse());
    } catch (NoninvertibleTransformException e) {
        throw new SVGOMException(SVGException.SVG_MATRIX_NOT_INVERTABLE,
                                 e.getMessage());
    }
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:12,代码来源:AbstractSVGMatrix.java

示例5: drawImage

import java.awt.geom.NoninvertibleTransformException; //导入方法依赖的package包/类
/**
 * Renders an image, applying a transform from image space into user space
 * before drawing.
 * The transformation from user space into device space is done with
 * the current <code>Transform</code> in the <code>Graphics2D</code>.
 * The specified transformation is applied to the image before the
 * transform attribute in the <code>Graphics2D</code> context is applied.
 * The rendering attributes applied include the <code>Clip</code>,
 * <code>Transform</code>, and <code>Composite</code> attributes.
 * Note that no rendering is done if the specified transform is
 * noninvertible.
 * @param img the <code>Image</code> to be rendered
 * @param xform the transformation from image space into user space
 * @param obs the {@link ImageObserver}
 * to be notified as more of the <code>Image</code>
 * is converted
 * @return <code>true</code> if the <code>Image</code> is
 * fully loaded and completely rendered;
 * <code>false</code> if the <code>Image</code> is still being loaded.
 * @see #transform
 * @see #setTransform
 * @see #setComposite
 * @see #clip
 * @see #setClip(Shape)
 */
public boolean drawImage(Image img,
                         AffineTransform xform,
                         ImageObserver obs){
    boolean retVal = true;

    if(xform.getDeterminant() != 0){
        AffineTransform inverseTransform = null;
        try{
            inverseTransform = xform.createInverse();
        }   catch(NoninvertibleTransformException e){
                            // Should never happen since we checked the
                            // matrix determinant
            throw new Error( e.getMessage() );
        }

        gc.transform(xform);
        retVal = drawImage(img, 0, 0, null);
        gc.transform(inverseTransform);
    }
    else{
        AffineTransform savTransform = new AffineTransform(gc.getTransform());
        gc.transform(xform);
        retVal = drawImage(img, 0, 0, null);
        gc.setTransform(savTransform);
    }

    return retVal;

}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:55,代码来源:AbstractGraphics2D.java

示例6: renderGVTTree

import java.awt.geom.NoninvertibleTransformException; //导入方法依赖的package包/类
/**
 * Renders the GVT tree.
 */
protected void renderGVTTree() {
    Rectangle visRect = getRenderRect();
    if (gvtRoot == null || visRect.width <= 0 || visRect.height <= 0) {
        return;
    }

    // Renderer setup.
    if (renderer == null || renderer.getTree() != gvtRoot) {
        renderer = createImageRenderer();
        renderer.setTree(gvtRoot);
    }

    // Area of interest computation.
    AffineTransform inv;
    try {
        inv = renderingTransform.createInverse();
    } catch (NoninvertibleTransformException e) {
        throw new IllegalStateException( "NoninvertibleTransformEx:" + e.getMessage() );
    }
    Shape s = inv.createTransformedShape(visRect);

    // Rendering thread setup.
    gvtTreeRenderer = new GVTTreeRenderer(renderer, renderingTransform,
                                          doubleBufferedRendering, s,
                                          visRect.width, visRect.height);
    gvtTreeRenderer.setPriority(Thread.MIN_PRIORITY);

    Iterator it = gvtTreeRendererListeners.iterator();
    while (it.hasNext()) {
        gvtTreeRenderer.addGVTTreeRendererListener
            ((GVTTreeRendererListener)it.next());
    }

    // Disable the dispatch during the rendering
    // to avoid concurrent access to the GVT tree.
    if (eventDispatcher != null) {
        eventDispatcher.setEventDispatchEnabled(false);
    }

    gvtTreeRenderer.start();
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:45,代码来源:JGVTComponent.java


注:本文中的java.awt.geom.NoninvertibleTransformException.getMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。