forked from geodmms/xdgnjobs

?? ?
2008-05-14 fe4bda7d456c106e1061afaa29d452e5553e9d96
xdgnjobs/ximple-dgnio/src/main/java/com/ximple/io/dgn7/LineElement.java
@@ -15,7 +15,7 @@
 */
public class LineElement extends Element implements GeometryConverter
{
    public LineElement(short[] raw)
    public LineElement(byte[] raw)
    {
        super(raw);
    }
@@ -27,15 +27,11 @@
    public Coordinate getEndPoint()
    {
        int endX = (int) ((raw[22] << 16) & 0xffff0000);
        int endX = ((raw[22] << 16) & 0xffff0000) | (raw[23] & 0x0000ffff);
        int endY = ((raw[24] << 16) & 0xffff0000) | (raw[25] & 0x0000ffff);
        endX = endX + (raw[23] & 0x0000ffff);
        double x    = Utility.converUnitToCoord(endX);
        int    endY = (int) ((raw[24] << 16) & 0xffff0000);
        endY = endY + (raw[25] & 0x0000ffff);
        double x = Utility.converUnitToCoord(endX);
        double y = Utility.converUnitToCoord(endY);
        return new Coordinate(x, y);
@@ -53,12 +49,11 @@
    public Coordinate getStartPoint()
    {
        int startX = (int) ((raw[18] << 16) & 0xffff0000);
        int startX = ((raw[18] << 16) & 0xffff0000);
        startX = startX + (raw[19] & 0x0000ffff);
        double x      = Utility.converUnitToCoord(startX);
        int    startY = (int) ((raw[20] << 16) & 0xffff0000);
        int    startY = ((raw[20] << 16) & 0xffff0000);
        startY = startY + (raw[21] & 0x0000ffff);
@@ -121,7 +116,7 @@
            return instance;
        }
        protected Element createElement(short[] raw)
        protected Element createElement(byte[] raw)
        {
            return new LineElement(raw);
        }