Examples of OMRect


Examples of com.bbn.openmap.omGraphics.OMRect

    /**
     * Return true of current bounds covers the projection area.
     */
    public boolean isOnMap(Projection proj) {
        OMRect bds = getBounds();
        bds.generate(proj);
        Shape s = bds.getShape();
        return s.intersects(0, 0, proj.getWidth(), proj.getHeight());
    }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMRect

        ret[0] = gl0;
        ret[1] = gl1;
        ret[2] = gl2;

        OMRect rect;

        for (int lat = starty; lat <= endy; lat++) {
            for (int lon = startx; lon <= endx; lon++) {
                if (level0Frames[lat + 90][lon + 180]) {
                    rect = new OMRect((float) lat, (float) lon, (float) lat + 1, (float) lon + 1, LineType);
                    rect.setLinePaint(level0Color);
                    if (fillRects)
                        rect.setFillPaint(level0Color);
                    gl0.add(rect);
                }

                if (level1Frames[lat + 90][lon + 180]) {
                    rect = new OMRect((float) lat + .1f, (float) lon + .1f, (float) lat + .9f, (float) lon + .9f, LineType);
                    rect.setLinePaint(level1Color);
                    if (fillRects)
                        rect.setFillPaint(level1Color);
                    gl1.add(rect);
                }

                if (level2Frames[lat + 90][lon + 180]) {
                    rect = new OMRect((float) lat + .2f, (float) lon + .2f, (float) lat + .8f, (float) lon + .8f, LineType);
                    rect.setLinePaint(level2Color);
                    if (fillRects)
                        rect.setFillPaint(level2Color);
                    gl2.add(rect);
                }
            }
        }
        return ret;
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMRect

    public OMGraphicList getCoverageBounds(Projection proj, DrawingAttributes da) {
        OMGraphicList list = new OMGraphicList();
        List asrps = getASRPDirs();

        for (Iterator it = asrps.iterator(); it.hasNext();) {
            OMRect rect = ((ASRPDirectory) it.next()).getBounds();
            da.setTo(rect);
            rect.generate(proj);

            list.add(rect);
        }
        return list;
    }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMRect

        boolean set = false;

        List asrps = getASRPDirs();

        for (Iterator it = asrps.iterator(); it.hasNext();) {
            OMRect rect = ((ASRPDirectory) it.next()).getBounds();
            float n = rect.getNorthLat();
            float s = rect.getSouthLat();
            float w = rect.getWestLon();
            float e = rect.getEastLon();

            if (n < miny)
                miny = n;
            if (n > maxy)
                maxy = n;
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMRect

        OMRect dot;

        public DTEDLocation(int x, int y) {
            text = new OMText(x + 10, y, (String) null, (java.awt.Font) null, OMText.JUSTIFY_LEFT);

            dot = new OMRect(x - 1, y - 1, x + 1, y + 1);
            text.setLinePaint(java.awt.Color.red);
            dot.setLinePaint(java.awt.Color.red);
        }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMRect

        }

        // create OMRect from internal rect representation
        switch (rect.rt) {
        case OMGraphic.RENDERTYPE_LATLON:
            omrect = new OMRect(rect.llpts[0], rect.llpts[1], rect.llpts[2], rect.llpts[3], rect.type, rect.nsegs);
            break;
        case OMGraphic.RENDERTYPE_XY:
            omrect = new OMRect(rect.xypts[0], rect.xypts[1], rect.xypts[2], rect.xypts[3]);
            break;
        case OMGraphic.RENDERTYPE_OFFSET:
            omrect = new OMRect(rect.llpts[0], rect.llpts[1], rect.xypts[0], rect.xypts[1], rect.xypts[2], rect.xypts[3]);
            break;
        default:
            System.err.println("ARRRR!");
            break;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.