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


Java LoopPipe类代码示例

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


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

示例1: validateCompClip

import sun.java2d.pipe.LoopPipe; //导入依赖的package包/类
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        if (usrClip instanceof Rectangle) {
            clipRegion = devClip.getIntersection((Rectangle)usrClip);
        } else {
            clipRegion = devClip.getIntersection(usrClip.getBounds());
        }
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:SunGraphics2D.java

示例2: draw

import sun.java2d.pipe.LoopPipe; //导入依赖的package包/类
public void draw(SunGraphics2D sg2d, Shape s) {
    if (sg2d.strokeState == sg2d.STROKE_THIN) {
        doShape(sg2d, s, false);
    } else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) {
        ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s);
        try {
            doFillSpans(sg2d, si);
        } finally {
            si.dispose();
        }
    } else {
        doShape(sg2d, sg2d.stroke.createStrokedShape(s), true);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:GDIRenderer.java

示例3: draw

import sun.java2d.pipe.LoopPipe; //导入依赖的package包/类
public void draw(SunGraphics2D sg2d, Shape s) {
    if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) {
        Path2D.Float p2df;
        int transx, transy;
        if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) {
            if (s instanceof Path2D.Float) {
                p2df = (Path2D.Float) s;
            } else {
                p2df = new Path2D.Float(s);
            }
            transx = sg2d.transX;
            transy = sg2d.transY;
        } else {
            p2df = new Path2D.Float(s, sg2d.transform);
            transx = 0;
            transy = 0;
        }
        drawPath(sg2d, p2df, transx, transy);
    } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) {
        ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s);
        try {
            fillSpans(sg2d, si, 0, 0);
        } finally {
            si.dispose();
        }
    } else {
        fill(sg2d, sg2d.stroke.createStrokedShape(s));
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:XRRenderer.java

示例4: draw

import sun.java2d.pipe.LoopPipe; //导入依赖的package包/类
public void draw(SunGraphics2D sg2d, Shape s) {
    if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) {
        // Delegate to drawPolygon() if possible...
        if (s instanceof Polygon &&
            sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE)
        {
            Polygon p = (Polygon) s;
            drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints);
            return;
        }

        // Otherwise we will use drawPath() for
        // high-quality thin paths.
        doPath(sg2d, s, false);
    } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) {
        // REMIND: X11 can handle uniform scaled wide lines
        // and dashed lines itself if we set the appropriate
        // XGC attributes (TBD).
        ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s);
        try {
            SunToolkit.awtLock();
            try {
                long xgc = validate(sg2d);
                XFillSpans(sg2d.surfaceData.getNativeOps(), xgc,
                           si, si.getNativeIterator(),
                           0, 0);
            } finally {
                SunToolkit.awtUnlock();
            }
        } finally {
            si.dispose();
        }
    } else {
        fill(sg2d, sg2d.stroke.createStrokedShape(s));
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:X11Renderer.java

示例5: validateCompClip

import sun.java2d.pipe.LoopPipe; //导入依赖的package包/类
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        clipRegion = devClip.getIntersection((Rectangle2D) usrClip);
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box, sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:32,代码来源:SunGraphics2D.java

示例6: draw

import sun.java2d.pipe.LoopPipe; //导入依赖的package包/类
public void draw(SunGraphics2D sg2d, Shape s) {
    if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) {
        doShape(sg2d, s, false);
    } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) {
        ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s);
        try {
            doFillSpans(sg2d, si);
        } finally {
            si.dispose();
        }
    } else {
        doShape(sg2d, sg2d.stroke.createStrokedShape(s), true);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:GDIRenderer.java

示例7: validateCompClip

import sun.java2d.pipe.LoopPipe; //导入依赖的package包/类
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        clipRegion = devClip.getIntersection((Rectangle2D) usrClip);
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
开发者ID:JetBrains,项目名称:jdk8u_jdk,代码行数:33,代码来源:SunGraphics2D.java

示例8: draw

import sun.java2d.pipe.LoopPipe; //导入依赖的package包/类
public void draw(SunGraphics2D sg2d, Shape s) {
    if (sg2d.strokeState == sg2d.STROKE_THIN) {
        // Delegate to drawPolygon() if possible...
        if (s instanceof Polygon &&
            sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE)
        {
            Polygon p = (Polygon) s;
            drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints);
            return;
        }

        // Otherwise we will use drawPath() for
        // high-quality thin paths.
        doPath(sg2d, s, false);
    } else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) {
        // REMIND: X11 can handle uniform scaled wide lines
        // and dashed lines itself if we set the appropriate
        // XGC attributes (TBD).
        ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s);
        try {
            SunToolkit.awtLock();
            try {
                long xgc = validate(sg2d);
                XFillSpans(sg2d.surfaceData.getNativeOps(), xgc,
                           si, si.getNativeIterator(),
                           0, 0);
            } finally {
                SunToolkit.awtUnlock();
            }
        } finally {
            si.dispose();
        }
    } else {
        fill(sg2d, sg2d.stroke.createStrokedShape(s));
    }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:37,代码来源:X11Renderer.java


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