Revision 10446 trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/readers/DwgFileV12Reader.java
DwgFileV12Reader.java | ||
---|---|---|
827 | 827 |
|
828 | 828 |
class InsertReader implements EntityReader{ |
829 | 829 |
public void read(ByteBuffer bb, char flags, short opts) { |
830 |
bb.order(ByteOrder.nativeOrder()); |
|
831 |
short w1 = bb.getShort(); |
|
832 |
double[] pt10 = getPoint(false); |
|
833 |
|
|
834 |
bb.order(ByteOrder.LITTLE_ENDIAN); |
|
835 |
if((opts & 0x1) > 0){ |
|
836 |
double db41 = bb.getDouble(); |
|
837 |
} |
|
838 |
|
|
839 |
if((opts & 0x2) > 0){ |
|
840 |
double db42 = bb.getDouble(); |
|
841 |
} |
|
842 |
|
|
843 |
if((opts & 0x4) > 0){ |
|
844 |
double db43 = bb.getDouble(); |
|
845 |
} |
|
846 |
|
|
847 |
if((opts & 0x8) > 0){ |
|
848 |
double db50 = bb.getDouble(); |
|
849 |
} |
|
850 |
|
|
851 |
if((opts & 0x10) > 0){ |
|
852 |
double db50 = bb.getDouble(); |
|
853 |
} |
|
854 |
//creo que esto est? mal, y que debe poner 0x20 |
|
855 |
if((opts & 0x10) > 0){ |
|
856 |
double db50 = bb.getDouble(); |
|
857 |
} |
|
858 |
|
|
859 |
|
|
860 |
|
|
861 |
|
|
862 |
/* |
|
830 | 863 |
|
831 |
/* |
|
832 |
def insert_reader(handle, flags, opts): |
|
833 |
print "insert_reader() ..." |
|
834 |
_w1 = struct.unpack('<h', handle.read(2))[0] |
|
835 |
print "word: %d" % _w1 |
|
836 |
_p10 = get_point(handle, False) |
|
837 |
print "point: " + str(_p10) |
|
838 |
if (opts & 0x1): |
|
839 |
_db41 = struct.unpack('<d', handle.read(8))[0] |
|
840 |
print "double: %g" % _db41 |
|
841 |
if (opts & 0x2): |
|
842 |
_db42 = struct.unpack('<d', handle.read(8))[0] |
|
843 |
print "double: %g" % _db42 |
|
844 |
if (opts & 0x4): |
|
845 |
_db43 = struct.unpack('<d', handle.read(8))[0] |
|
846 |
print "double: %g" % _db43 |
|
847 |
if (opts & 0x8): |
|
848 |
_db50 = struct.unpack('<d', handle.read(8))[0] |
|
849 |
print "double: %g" % _db50 |
|
864 |
|
|
865 |
|
|
850 | 866 |
if (opts & 0x10): |
851 | 867 |
_w70 = struct.unpack('<h', handle.read(2))[0] |
852 | 868 |
print "word: %d" % _w70 |
Also available in: Unified diff