From 6523c1f6534042d89ff8a07d4e7c06050276521e Mon Sep 17 00:00:00 2001 From: ?? ? <ulysseskao@ximple.com.tw> Date: Thu, 22 Apr 2010 16:31:12 +0800 Subject: [PATCH] dgn7 write function for complex chain --- xdgnjobs/ximple-dgnio/src/main/java/com/ximple/io/dgn7/Element.java | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/xdgnjobs/ximple-dgnio/src/main/java/com/ximple/io/dgn7/Element.java b/xdgnjobs/ximple-dgnio/src/main/java/com/ximple/io/dgn7/Element.java index 91f0198..5c44664 100644 --- a/xdgnjobs/ximple-dgnio/src/main/java/com/ximple/io/dgn7/Element.java +++ b/xdgnjobs/ximple-dgnio/src/main/java/com/ximple/io/dgn7/Element.java @@ -17,7 +17,6 @@ * * @author Ulysses * @version 0.1 - * @since 2006/5/18 �W�� 11:14:50 */ public class Element { public static final int CONSTRUCTION_CLASS = 0; @@ -85,6 +84,10 @@ raw[5] = (short) (temp >> 16 & 0x0000ffff); raw[4] = (short) (temp & 0x0000ffff); + // lowZ + raw[7] = 0; + raw[8] = 0; + int highCoorX = DgnUtility.converCoordToUnit(bbox.getMaxX()); temp = DgnUtility.converToDGN(highCoorX); raw[9] = (short) (temp >> 16 & 0x0000ffff); @@ -94,6 +97,11 @@ temp = DgnUtility.converToDGN(highCoorY); raw[11] = (short) (temp >> 16 & 0x0000ffff); raw[10] = (short) (temp & 0x0000ffff); + + // highZ + raw[13] = (short) 0xffff; + raw[12] = (short) 0xffff; + } public boolean isComponentElement() { @@ -163,6 +171,15 @@ } } + public short getFollowLength() { + return raw[1]; + } + + protected void setFollowLength(short value) { + assert (raw.length >= value + 2); + raw[1] = value; + } + public void addUserAttributeData(byte[] pDataBlock, Class dataClass, int iLinkageId) throws Element.Exception { } @@ -183,6 +200,10 @@ return true; } + public int getUserAttributeDataOffset() { + return (raw[15] + 16); + } + public List<UserAttributeData> getUserAttributeData() { short[] data; short length, nextAttribute; -- Gitblit v0.0.0-SNAPSHOT