Package com.bbn.openmap.omGraphics

Examples of com.bbn.openmap.omGraphics.OMEllipse


     * @see com.bbn.openmap.omGraphics.OMEllipse
     */
    public static OMEllipse read(DataInputStream dis,
                                 LinkProperties propertiesBuffer)
            throws IOException {
        OMEllipse ellipse = null;

        int renderType = dis.readByte();

        switch (renderType) {
        case RENDERTYPE_LATLON: {
            float lat = dis.readFloat();
            float lon = dis.readFloat();
            double majorAxisSpan = dis.readFloat();
            double minorAxisSpan = dis.readFloat();
            int units = dis.readByte();
            double rotationAngle = dis.readFloat();

            Length unit = Length.DECIMAL_DEGREE;
            switch (units) {
            case 0:
                unit = Length.KM;
                break;
            case 1:
                unit = Length.MILE;
                break;
            case 2:
                unit = Length.NM;
                break;
            default:
                break;
            }

            ellipse = new OMEllipse(new LatLonPoint(lat, lon), majorAxisSpan, minorAxisSpan, unit, rotationAngle);
            break;
        }
        case RENDERTYPE_XY: {
            int x = dis.readInt();
            int y = dis.readInt();
            int majorAxisSpan = dis.readInt();
            int minorAxisSpan = dis.readInt();
            double rotationAngle = dis.readFloat();

            ellipse = new OMEllipse(x, y, majorAxisSpan, minorAxisSpan, rotationAngle);
            break;
        }
        case RENDERTYPE_OFFSET: {
            float lat = dis.readFloat();
            float lon = dis.readFloat();
            int offsetX = dis.readInt();
            int offsetY = dis.readInt();
            int w = dis.readInt();
            int h = dis.readInt();
            double rotationAngle = dis.readFloat();

            ellipse = new OMEllipse(new LatLonPoint(lat, lon), offsetX, offsetY, w, h, rotationAngle);
            break;
        }
        default: {
            Debug.error("LinkEllipse.read: ellipse rendertype unknown.");
            break;
View Full Code Here


            point.setSelectPaint(Color.yellow);
            pointList.add(point);
        }
        omList.add(pointList);

        OMEllipse ell = new OMEllipse(new LatLonPoint(60f, -110), 1000, 300, Length.NM, com.bbn.openmap.MoreMath.HALF_PI / 2.0);

        ell.setLinePaint(Color.blue);
        // ell.setFillPaint(Color.yellow);
        omList.add(ell);

        ell = new OMEllipse(new LatLonPoint(40f, -75), 800, 250, Length.MILE, 0);

        ell.setFillPaint(Color.yellow);
        omList.add(ell);

        float[] llp2 = new float[] { 0.41789755f, -1.435303f, 0.41813868f,
                -1.3967744f };
View Full Code Here

TOP

Related Classes of com.bbn.openmap.omGraphics.OMEllipse

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.