Package ae.sun.java2d.pipe

Examples of ae.sun.java2d.pipe.Region


                             boolean close)
    {
        PixelWriter pw = GeneralRenderer.createSolidPixelWriter(sg2d, sData);

        int off = 0;
        Region clip = sg2d.getCompClip();
        for (int i = 0; i < numPolys; i++) {
            int numpts = nPoints[i];
            GeneralRenderer.doDrawPoly(sData, pw,
                                       xPoints, yPoints, off, numpts,
                                       clip, transx, transy, close);
View Full Code Here


    public void FillRect(SunGraphics2D sg2d, SurfaceData sData,
                            int x, int y, int w, int h)
    {
        PixelWriter pw = GeneralRenderer.createXorPixelWriter(sg2d, sData);

        Region r = sg2d.getCompClip().getBoundsIntersectionXYWH(x, y, w, h);

        GeneralRenderer.doSetRect(sData, pw,
                                  r.getLoX(), r.getLoY(),
                                  r.getHiX(), r.getHiY());
    }
View Full Code Here

                             boolean close)
    {
        PixelWriter pw = GeneralRenderer.createXorPixelWriter(sg2d, sData);

        int off = 0;
        Region clip = sg2d.getCompClip();
        for (int i = 0; i < numPolys; i++) {
            int numpts = nPoints[i];
            GeneralRenderer.doDrawPoly(sData, pw,
                                       xPoints, yPoints, off, numpts,
                                       clip, transx, transy, close);
View Full Code Here

                                          int dstx, int dsty,
                                          int width, int height,
                                          byte mask[], int offset, int scan)
        {
            SurfaceData src, dst;
            Region opclip;
            int sx, sy, dx, dy;

            if (convertsrc == null) {
                src = srcData;
                sx = srcx;
View Full Code Here

        public void DrawGlyphListAA(SunGraphics2D sg2d, SurfaceData dest,
                                    GlyphList gl)
        {
            gl.getBounds(); // Don't delete, bug 4895493
            int num = gl.getNumGlyphs();
            Region clip = sg2d.getCompClip();
            int cx1 = clip.getLoX();
            int cy1 = clip.getLoY();
            int cx2 = clip.getHiX();
            int cy2 = clip.getHiY();
            for (int i = 0; i < num; i++) {
                gl.setGlyphIndex(i);
                int metrics[] = gl.getMetrics();
                int gx1 = metrics[0];
                int gy1 = metrics[1];
View Full Code Here

    public Graphics create() {
        return (Graphics) clone();
    }

    public void setDevClip(int x, int y, int w, int h) {
        Region c = constrainClip;
        if (c == null) {
            devClip = Region.getInstanceXYWH(x, y, w, h);
        } else {
            devClip = c.getIntersectionXYWH(x, y, w, h);
        }
        validateCompClip();
    }
View Full Code Here

        }
        x = constrainX = transX;
        y = constrainY = transY;
        w = Region.dimAdd(x, w);
        h = Region.dimAdd(y, h);
        Region c = constrainClip;
        if (c == null) {
            c = Region.getInstanceXYXY(x, y, w, h);
        } else {
            c = c.getIntersectionXYXY(x, y, w, h);
            if (c == constrainClip) {
                // Common case to ignore
                return;
            }
        }
View Full Code Here

            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 &&
View Full Code Here

            throw new InternalError("transformed copyArea not implemented yet");
        }
        // REMIND: This method does not deal with missing data from the
        // source object (i.e. it does not send exposure events...)

        Region clip = getCompClip();

        Composite comp = composite;
        if (lastCAcomp != comp) {
            SurfaceType dsttype = theData.getSurfaceType();
            CompositeType comptype = imageComp;
View Full Code Here

            return null;
        }

        SunGraphics2D sg2d = (SunGraphics2D)g;
        SurfaceData sData = (SurfaceData)sg2d.surfaceData;
        Region r = sg2d.getCompClip();
        if (!r.isRectangular()) {
            // caller probably doesn't know how to handle shape clip
            // appropriately, so just return null (Swing currently never
            // sets a shape clip, but that could change in the future)
            return null;
        }

        // this is the upper-left origin of the scissor box relative to the
        // upper-left origin of the surface (in Java 2D coordinates)
        int x0 = r.getLoX();
        int y0 = r.getLoY();

        // this is the width and height of the scissor region
        int w = r.getWidth();
        int h = r.getHeight();

        // this is the lower-left origin of the scissor box relative to the
        // lower-left origin of the surface (in OpenGL coordinates)
        Rectangle surfaceBounds = sData.getBounds();
        int x1 = x0;
View Full Code Here

TOP

Related Classes of ae.sun.java2d.pipe.Region

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.