forked from geodmms/xdgnjobs

?? ?
2008-05-14 2631b9ee4a3625df1dc66926e8610f93c1ecd81f
xdgnjobs/ximple-dgnio/src/main/java/com/ximple/io/dgn7/ArcElement.java
@@ -24,14 +24,14 @@
    {
        int angle = (raw[18] << 16 & 0xffff0000);
        angle += raw[19] & 0x0000ffff;
        angle |= raw[19] & 0x0000ffff;
        return Utility.ConverIntToRotation(angle);
        return Utility.converIntToRotation(angle);
    }
    public void setStartAngle(double value)
    {
        int angle = Utility.ConverRotatioToInt(value);
        int angle = Utility.converRotatioToInt(value);
        raw[18] = (short) (angle >>> 16 & 0x0000ffff);
        raw[19] = (short) (angle & 0x0000ffff);
@@ -41,14 +41,14 @@
    {
        int angle = (raw[20] << 16 & 0xffff0000);
        angle += raw[21] & 0x0000ffff;
        angle |= raw[21] & 0x0000ffff;
        return Utility.ConverIntToRotation(angle);
        return Utility.converIntToRotation(angle);
    }
    public void setSweepAngle(double value)
    {
        int angle = Utility.ConverRotatioToInt(value);
        int angle = Utility.converRotatioToInt(value);
        raw[20] = (short) (angle >> 16 & 0x0000ffff);
        raw[21] = (short) (angle & 0x0000ffff);
@@ -60,13 +60,13 @@
        System.arraycopy(raw, 22, primary, 0, 4);
        return Utility.DGNToIEEEDouble(primary) / 1000.0;
        return Utility.convertDGNToIEEEDouble(primary) / 1000.0;
    }
    public void setPrimary(double value)
    {
        double  temp    = value * 1000.0;
        short[] primary = Utility.IEEEDoubleToDGN(temp);
        short[] primary = Utility.convertIEEEDoubleToDGN(temp);
        System.arraycopy(primary, 0, raw, 22, 4);
    }
@@ -77,13 +77,13 @@
        System.arraycopy(raw, 26, secondary, 0, 4);
        return Utility.DGNToIEEEDouble(secondary) / 1000.0;
        return Utility.convertDGNToIEEEDouble(secondary) / 1000.0;
    }
    public void setSecondary(double value)
    {
        double  temp      = value * 1000.0;
        short[] secondary = Utility.IEEEDoubleToDGN(temp);
        short[] secondary = Utility.convertIEEEDoubleToDGN(temp);
        System.arraycopy(secondary, 0, raw, 26, 4);
    }
@@ -92,14 +92,14 @@
    {
        int rotation = (raw[30] << 16 & 0xffff0000);
        rotation += raw[31] & 0x0000ffff;
        rotation |= raw[31] & 0x0000ffff;
        return Utility.ConverIntToRotation(rotation);
        return Utility.converIntToRotation(rotation);
    }
    public void setRotationAngle(double value)
    {
        int angle = Utility.ConverRotatioToInt(value);
        int angle = Utility.converRotatioToInt(value);
        raw[30] = (short) (angle >> 16 & 0x0000ffff);
        raw[31] = (short) (angle & 0x0000ffff);
@@ -111,25 +111,25 @@
        System.arraycopy(raw, 32, x, 0, 4);
        double  dx = Utility.ConverUnitToCoord((int) Utility.DGNToIEEEDouble(x));
        double  dx = Utility.converUnitToCoord((int) Utility.convertDGNToIEEEDouble(x));
        short[] y  = new short[4];
        System.arraycopy(raw, 36, y, 0, 4);
        double dy = Utility.ConverUnitToCoord((int) Utility.DGNToIEEEDouble(y));
        double dy = Utility.converUnitToCoord((int) Utility.convertDGNToIEEEDouble(y));
        return new Coordinate(dx, dy);
    }
    public void setOrigin(Coordinate value)
    {
        double  temp = Utility.ConverCoordToUnit(value.x);
        short[] x    = Utility.IEEEDoubleToDGN(temp);
        double  temp = Utility.converCoordToUnit(value.x);
        short[] x    = Utility.convertIEEEDoubleToDGN(temp);
        System.arraycopy(x, 0, raw, 32, 4);
        temp = Utility.ConverCoordToUnit(value.y);
        temp = Utility.converCoordToUnit(value.y);
        short[] y = Utility.IEEEDoubleToDGN(temp);
        short[] y = Utility.convertIEEEDoubleToDGN(temp);
        System.arraycopy(y, 0, raw, 36, 4);
    }
@@ -145,7 +145,7 @@
    private Coordinate[] convertToLineString(int pts)
    {
        Coordinate[] result = new Coordinate[pts];
        double beta = -getRotationAngle() / 180 * Math.PI;
        double beta = Utility.converRotationToRadian(-getRotationAngle());
        double sinbeta = Math.sin(beta);
        double cosbeta = Math.cos(beta);
        double startAngle = getStartAngle();
@@ -157,7 +157,7 @@
            if (i < pts)
            {
                Coordinate pt = new Coordinate();
                double alpha = current / 180 * Math.PI;
                double alpha = Utility.converRotationToRadian(current);
                double sinalpha = Math.sin(alpha);
                double cosalpha = Math.cos(alpha);
                pt.x = getOrigin().x + (getPrimary() * cosalpha * cosbeta -