Package sun.dc.pr

Examples of sun.dc.pr.PathStroker


                                    float miterlimit,
                                    float dashes[],
                                    float dashphase)
    {
        FillAdapter filler = new FillAdapter();
        PathStroker stroker = new PathStroker(filler);
        PathDasher dasher = null;

        try {
            PathConsumer consumer;

            stroker.setPenDiameter(width);
            stroker.setPenT4(null);
            stroker.setCaps(RasterizerCaps[caps]);
            stroker.setCorners(RasterizerCorners[join], miterlimit);
            if (dashes != null) {
                dasher = new PathDasher(stroker);
                dasher.setDash(dashes, dashphase);
                dasher.setDashT4(null);
                consumer = dasher;
            } else {
                consumer = stroker;
            }

            feedConsumer(consumer, src.getPathIterator(null));
        } finally {
            stroker.dispose();
            if (dasher != null) {
                dasher.dispose();
            }
        }
View Full Code Here


                         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());
View Full Code Here

     * PathConsumer.
     */
    public static PathConsumer createStroker(PathConsumer consumer,
                                             BasicStroke bs, boolean thin,
                                             AffineTransform transform) {
        PathStroker stroker = new PathStroker(consumer);
        consumer = stroker;

        float matrix[] = null;
        if (!thin) {
            stroker.setPenDiameter(bs.getLineWidth());
            if (transform != null) {
                matrix = new float[4];
                double dmatrix[] = new double[6];
                transform.getMatrix(dmatrix);
                for (int i = 0; i < 4; i++) {
                    matrix[i] = (float) dmatrix[i];
                }
            }
            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());
View Full Code Here

TOP

Related Classes of sun.dc.pr.PathStroker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.