| | |
| | | import java.util.List; |
| | | import java.util.ListIterator; |
| | | |
| | | import org.apache.log4j.Logger; |
| | | |
| | | import com.vividsolutions.jts.geom.Coordinate; |
| | | import com.vividsolutions.jts.geom.Geometry; |
| | | import com.vividsolutions.jts.geom.GeometryFactory; |
| | | |
| | | import com.ximple.util.DgnUtility; |
| | | |
| | | /** |
| | | * TextNodeElement |
| | |
| | | */ |
| | | public class TextNodeElement extends Element implements ComplexElement, GeometryConverter |
| | | { |
| | | ArrayList list = new ArrayList(); |
| | | private static final Logger logger = Logger.getLogger(TextElement.class); |
| | | |
| | | private ArrayList list = new ArrayList(); |
| | | |
| | | public TextNodeElement(byte[] raw) |
| | | { |
| | |
| | | lengthMult = (int) ((raw[25] << 16) & 0xffff0000); |
| | | lengthMult += (raw[26] & 0x0000ffff); |
| | | |
| | | return Utility.converIntToDouble(lengthMult); |
| | | return DgnUtility.converIntToDouble(lengthMult); |
| | | } |
| | | |
| | | public double getTextNodeHeight() |
| | |
| | | heightMult = (int) ((raw[27] << 16) & 0xffff0000); |
| | | heightMult += (raw[28] & 0x0000ffff); |
| | | |
| | | return Utility.converIntToDouble(heightMult); |
| | | return DgnUtility.converIntToDouble(heightMult); |
| | | } |
| | | |
| | | public double getRotationAngle() |
| | |
| | | |
| | | rotation += raw[30]; |
| | | |
| | | return Utility.converIntToRotation(rotation); |
| | | return DgnUtility.converIntToRotation(rotation); |
| | | } |
| | | |
| | | public Coordinate getOrigin() |
| | |
| | | |
| | | x += raw[32] & 0x0000ffff; |
| | | |
| | | // return Utility.convertFromDGN(x); |
| | | double dx = Utility.converUnitToCoord(x); |
| | | // return DgnUtility.convertFromDGN(x); |
| | | double dx = DgnUtility.converUnitToCoord(x); |
| | | int y = (int) ((raw[33] << 16) & 0xffff0000); |
| | | |
| | | y += (raw[34] & 0x0000ffff); |
| | | |
| | | double dy = Utility.converUnitToCoord(y); |
| | | double dy = DgnUtility.converUnitToCoord(y); |
| | | |
| | | return new Coordinate(dx, dy); |
| | | } |