forked from geodmms/xdgnjobs

?? ?
2008-05-15 0acf7a49b2da4dd1873d64012ba360eaf51754f4
xdgnjobs/ximple-dgnio/src/main/java/com/ximple/io/dgn7/TextElement.java
@@ -2,10 +2,14 @@
//~--- non-JDK imports --------------------------------------------------------
import org.apache.log4j.Logger;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Envelope;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.ximple.util.DgnUtility;
/**
 * TextElement
@@ -16,6 +20,8 @@
 */
public class TextElement extends Element implements GeometryConverter
{
    private static final Logger logger = Logger.getLogger(TextElement.class);
    public static final int ED_CENTERJUSTIFICATION = 0;
    //  Enter data field center justification
@@ -62,12 +68,12 @@
        x += raw[26] & 0x0000ffff;
        double dx = Utility.converUnitToCoord(x);
        double dx = DgnUtility.converUnitToCoord(x);
        int y = (raw[27] << 16 & 0xffff0000);
        y += raw[28] & 0x0000ffff;
        double dy = Utility.converUnitToCoord(y);
        double dy = DgnUtility.converUnitToCoord(y);
        return new Coordinate(dx, dy);
    }
@@ -78,7 +84,7 @@
        double x = origin.x;
        double weight = getUserSetWeight();
        double height = getUserSetHeight();
        double angle = Utility.converRotationToRadian(getRotationAngle());
        double angle = DgnUtility.converRotationToRadian(getRotationAngle());
        x += weight * Math.cos(angle) - height * Math.sin(angle);
@@ -186,7 +192,7 @@
        height += raw[22] & 0x0000ffff;
        return Utility.converIntToDouble(height);
        return DgnUtility.converIntToDouble(height);
    }
    public double getTextWidth()
@@ -195,7 +201,7 @@
        length += raw[20] & 0x0000ffff;
        return Utility.converIntToDouble(length);
        return DgnUtility.converIntToDouble(length);
    }
    public int getJustification()
@@ -209,7 +215,7 @@
        totation += raw[24] & 0x0000ffff;
        return Utility.converIntToRotation(totation);
        return DgnUtility.converIntToRotation(totation);
    }
    public boolean isChinese()