Package org.apache.harmony.awt.gl

Examples of org.apache.harmony.awt.gl.MultiRectArea


        // Have to copy transform and clip explicitly, since we use opengl transforms
        res.setTransform(new AffineTransform(glTransform));
        if (clip == null) {
            res.setTransformedClip(null);
        } else {
            res.setTransformedClip(new MultiRectArea(clip));
        }

        return res;
    }
View Full Code Here


    public Shape getClip() {
        if (clip == null) {
            return null;
        }

        MultiRectArea res = new MultiRectArea(clip);
        return res;
    }
View Full Code Here

        setTransform(newTransform);
    }

    @Override
    public void clipRect(int x, int y, int width, int height) {
        MultiRectArea mra = new MultiRectArea(x, y, x+width-1, y+height-1);

        if (clip == null) {
            setTransformedClip(mra);
        } else {
            clip.intersect(mra);
View Full Code Here

public class ClipRegion extends Rectangle {
    private final MultiRectArea clip;

    public ClipRegion(final MultiRectArea clip) {
        this.clip = new MultiRectArea(clip);
        setBounds(clip.getBounds());
    }
View Full Code Here

        return false;
    }

    MultiRectArea getAccumulatedClip(long windowId) {
        Long id = new Long(windowId);
        MultiRectArea clip = (MultiRectArea)accumulatedClipRegions.get(id);
        if (clip == null) {
            clip = new MultiRectArea();
            accumulatedClipRegions.put(id, clip);
        }
        return clip;
    }
View Full Code Here

        this.factory = factory;
        setEvent(event);
    }

    public MultiRectArea getClipRects() {
        return new MultiRectArea(clipRects);
    }
View Full Code Here

            wm.setFocusedWindow(newFocusedWindow);
        }
    }

    private void processExposeEvent(X11.XExposeEvent event) {
        MultiRectArea clip = nativeQueue.getAccumulatedClip(windowId);

        clip.add(new Rectangle(event.get_x(), event.get_y(),
                event.get_width(), event.get_height()));

        if (event.get_count() != 0) {
            eventId = ID_PLATFORM;
        } else {
View Full Code Here

        RepaintManager.currentManager(blitingComponent).markCompletelyClean(parent);

        g.copyArea(adjustedCopyRect.x - dx, adjustedCopyRect.y - dy, adjustedCopyRect.width, adjustedCopyRect.height, dx, dy);

        wasPainted = false;
        MultiRectArea affectedArea = new MultiRectArea(visibleBounds);
        affectedArea.add(lastPaintedRect);
        affectedArea.substract(adjustedCopyRect);
        if (!affectedArea.isEmpty()) {
            Shape oldClip = g.getClip();

            g.setClip(affectedArea);
            parent.paint(g);
View Full Code Here

        return true;
    }

    private boolean isObscured(final int x, final int y, final int width, final int height) {
        MultiRectArea obscuredArea = ComponentInternals.getComponentInternals().getObscuredRegion(parent);
        if (obscuredArea == null || obscuredArea.isEmpty()) {
            return false;
        }
        return obscuredArea.intersects(x, y, width, height);
    }
View Full Code Here

            if (behaviour instanceof LWBehavior) {
                if (parent == null || !parent.visible || !parent.behaviour.isDisplayable()) {
                    return;
                }
                if (repaintRegion == null) {
                    repaintRegion = new MultiRectArea(new Rectangle(x, y, width, height));
                }
                repaintRegion.intersect(new Rectangle(0, 0, this.w, this.h));
                repaintRegion.translate(this.x, this.y);
                parent.repaintRegion = repaintRegion;
                repaintRegion = null;
View Full Code Here

TOP

Related Classes of org.apache.harmony.awt.gl.MultiRectArea

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.