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


Java PathException类代码示例

本文整理汇总了Java中sun.dc.path.PathException的典型用法代码示例。如果您正苦于以下问题:Java PathException类的具体用法?Java PathException怎么用?Java PathException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: RPGProject

import sun.dc.path.PathException; //导入依赖的package包/类
/**
 * RPGProject Constructor
 *
 * @param path - Path to the RPG-Maker-Project
 * @param verifyRPGDir - true if the RPG-Maker-Directory should verified
 * @throws PathException - Path doesn't exists/Not Valid-Dir exception
 */
RPGProject(@NotNull String path, boolean verifyRPGDir) throws PathException {
	if(! File.existsDir(path))
		throw new PathException("Project-Path doesn't exists!");

	this.setPath(path);

	// Check if Path is a Valid-RPG-Maker-Dir
	if(verifyRPGDir)
		if(! this.verifyDir())
			throw new PathException("Directory is not a Valid RPG-Maker-MV Directory!");

	this.loadFiles();
	this.findSystemFile();

	if(this.getSystem() != null)
		this.checkIfEncrypted();

	if(this.isEncrypted())
		this.findEncryptedFiles();
}
 
开发者ID:Petschko,项目名称:Java-RPG-Maker-MV-Decrypter,代码行数:28,代码来源:RPGProject.java

示例2: strokeTo

import sun.dc.path.PathException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void strokeTo(Shape src,
                     AffineTransform transform,
                     BasicStroke bs,
                     boolean thin,
                     boolean normalize,
                     boolean antialias,
                     PathConsumer2D sr)
{
    PathStroker stroker = new PathStroker(sr);
    PathConsumer consumer = stroker;

    float matrix[] = null;
    if (!thin) {
        stroker.setPenDiameter(bs.getLineWidth());
        if (transform != null) {
            matrix = getTransformMatrix(transform);
        }
        stroker.setPenT4(matrix);
        stroker.setPenFitting(PenUnits, MinPenUnits);
    }
    stroker.setCaps(RasterizerCaps[bs.getEndCap()]);
    stroker.setCorners(RasterizerCorners[bs.getLineJoin()],
                       bs.getMiterLimit());
    float[] dashes = bs.getDashArray();
    if (dashes != null) {
        PathDasher dasher = new PathDasher(stroker);
        dasher.setDash(dashes, bs.getDashPhase());
        if (transform != null && matrix == null) {
            matrix = getTransformMatrix(transform);
        }
        dasher.setDashT4(matrix);
        consumer = dasher;
    }

    try {
        PathIterator pi = src.getPathIterator(transform);

        feedConsumer(pi, consumer, normalize, 0.25f);
    } catch (PathException e) {
        throw new InternalError("Unable to Stroke shape ("+
                                e.getMessage()+")", e);
    } finally {
        while (consumer != null && consumer != sr) {
            PathConsumer next = consumer.getConsumer();
            consumer.dispose();
            consumer = next;
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:54,代码来源:DuctusRenderingEngine.java

示例3: feedConsumer

import sun.dc.path.PathException; //导入依赖的package包/类
private void feedConsumer(PathConsumer consumer, PathIterator pi) {
    try {
        consumer.beginPath();
        boolean pathClosed = false;
        float mx = 0.0f;
        float my = 0.0f;
        float point[]  = new float[6];

        while (!pi.isDone()) {
            int type = pi.currentSegment(point);
            if (pathClosed == true) {
                pathClosed = false;
                if (type != PathIterator.SEG_MOVETO) {
                    // Force current point back to last moveto point
                    consumer.beginSubpath(mx, my);
                }
            }
            switch (type) {
            case PathIterator.SEG_MOVETO:
                mx = point[0];
                my = point[1];
                consumer.beginSubpath(point[0], point[1]);
                break;
            case PathIterator.SEG_LINETO:
                consumer.appendLine(point[0], point[1]);
                break;
            case PathIterator.SEG_QUADTO:
                consumer.appendQuadratic(point[0], point[1],
                                         point[2], point[3]);
                break;
            case PathIterator.SEG_CUBICTO:
                consumer.appendCubic(point[0], point[1],
                                     point[2], point[3],
                                     point[4], point[5]);
                break;
            case PathIterator.SEG_CLOSE:
                consumer.closedSubpath();
                pathClosed = true;
                break;
            }
            pi.next();
        }

        consumer.endPath();
    } catch (PathException e) {
        throw new InternalError("Unable to Stroke shape ("+
                                e.getMessage()+")", e);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:50,代码来源:DuctusRenderingEngine.java

示例4: useProxy

import sun.dc.path.PathException; //导入依赖的package包/类
public void useProxy(FastPathProducer proxy)
    throws PathException
{
    proxy.sendTo(this);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:DuctusRenderingEngine.java

示例5: feedConsumer

import sun.dc.path.PathException; //导入依赖的package包/类
private void feedConsumer(PathConsumer consumer, PathIterator pi) {
try {
    consumer.beginPath();
    boolean pathClosed = false;
    float mx = 0.0f;
    float my = 0.0f;
    float point[]  = new float[6];

    while (!pi.isDone()) {
	int type = pi.currentSegment(point);
	if (pathClosed == true) {
	    pathClosed = false;
	    if (type != PathIterator.SEG_MOVETO) {
		// Force current point back to last moveto point
		consumer.beginSubpath(mx, my);
	    }
	}
	switch (type) {
	case PathIterator.SEG_MOVETO:
	    mx = point[0];
	    my = point[1];
	    consumer.beginSubpath(point[0], point[1]);
	    break;
	case PathIterator.SEG_LINETO:
	    consumer.appendLine(point[0], point[1]);
	    break;
	case PathIterator.SEG_QUADTO:
	    // Quadratic curves take two points
	    consumer.appendQuadratic(point[0], point[1],
				     point[2], point[3]);
	    break;
	case PathIterator.SEG_CUBICTO:
	    // Cubic curves take three points
	    consumer.appendCubic(point[0], point[1],
				 point[2], point[3],
				 point[4], point[5]);
	    break;
	case PathIterator.SEG_CLOSE:
	    consumer.closedSubpath();
	    pathClosed = true;
	    break;
	}
	pi.next();
    }

    consumer.endPath();
} catch (PathException e) {
    throw new InternalError("Unable to Stroke shape ("+
			    e.getMessage()+")");
}
   }
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:52,代码来源:BasicStroke.java

示例6: strokeTo

import sun.dc.path.PathException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void strokeTo(Shape src,
                     AffineTransform transform,
                     BasicStroke bs,
                     boolean thin,
                     boolean normalize,
                     boolean antialias,
                     PathConsumer2D sr)
{
    PathStroker stroker = new PathStroker(sr);
    PathConsumer consumer = stroker;

    float matrix[] = null;
    if (!thin) {
        stroker.setPenDiameter(bs.getLineWidth());
        if (transform != null) {
            matrix = getTransformMatrix(transform);
        }
        stroker.setPenT4(matrix);
        stroker.setPenFitting(PenUnits, MinPenUnits);
    }
    stroker.setCaps(RasterizerCaps[bs.getEndCap()]);
    stroker.setCorners(RasterizerCorners[bs.getLineJoin()],
                       bs.getMiterLimit());
    float[] dashes = bs.getDashArray();
    if (dashes != null) {
        PathDasher dasher = new PathDasher(stroker);
        dasher.setDash(dashes, bs.getDashPhase());
        if (transform != null && matrix == null) {
            matrix = getTransformMatrix(transform);
        }
        dasher.setDashT4(matrix);
        consumer = dasher;
    }

    try {
        PathIterator pi = src.getPathIterator(transform);

        feedConsumer(pi, consumer, normalize, 0.25f);
    } catch (PathException e) {
        throw new InternalError("Unable to Stroke shape ("+
                                e.getMessage()+")");
    } finally {
        while (consumer != null && consumer != sr) {
            PathConsumer next = consumer.getConsumer();
            consumer.dispose();
            consumer = next;
        }
    }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:54,代码来源:DuctusRenderingEngine.java

示例7: feedConsumer

import sun.dc.path.PathException; //导入依赖的package包/类
private void feedConsumer(PathConsumer consumer, PathIterator pi) {
    try {
        consumer.beginPath();
        boolean pathClosed = false;
        float mx = 0.0f;
        float my = 0.0f;
        float point[]  = new float[6];

        while (!pi.isDone()) {
            int type = pi.currentSegment(point);
            if (pathClosed == true) {
                pathClosed = false;
                if (type != PathIterator.SEG_MOVETO) {
                    // Force current point back to last moveto point
                    consumer.beginSubpath(mx, my);
                }
            }
            switch (type) {
            case PathIterator.SEG_MOVETO:
                mx = point[0];
                my = point[1];
                consumer.beginSubpath(point[0], point[1]);
                break;
            case PathIterator.SEG_LINETO:
                consumer.appendLine(point[0], point[1]);
                break;
            case PathIterator.SEG_QUADTO:
                consumer.appendQuadratic(point[0], point[1],
                                         point[2], point[3]);
                break;
            case PathIterator.SEG_CUBICTO:
                consumer.appendCubic(point[0], point[1],
                                     point[2], point[3],
                                     point[4], point[5]);
                break;
            case PathIterator.SEG_CLOSE:
                consumer.closedSubpath();
                pathClosed = true;
                break;
            }
            pi.next();
        }

        consumer.endPath();
    } catch (PathException e) {
        throw new InternalError("Unable to Stroke shape ("+
                                e.getMessage()+")");
    }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:50,代码来源:DuctusRenderingEngine.java


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