libredwg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libredwg] Comon entity data color in dwg 2004?


From: Ivan
Subject: Re: [libredwg] Comon entity data color in dwg 2004?
Date: Sat, 9 Jul 2011 16:08:57 +0200

Ok, but current code doesn't actually gets the color value, it's only
reading it not storing it anywhere...

I needed to change
================
if (c2 == 0x80)
{
c3 = bit_read_RC(dat);  // rgb color
c4 = bit_read_RC(dat);
c5 = bit_read_RC(dat);
c6 = bit_read_RC(dat);
name = bit_read_TV(dat);
}
================
if (c2 & 0x80)
{
c3 = bit_read_RC(dat);  // rgb color
c4 = bit_read_RC(dat);
c5 = bit_read_RC(dat);
c6 = bit_read_RC(dat);
name = bit_read_TV(dat);
}
if (c2 & 0x20)
{
bit_read_BL(dat);
}

Another thing is that if (c2 & 0x40) color handle is stored in "common
entity handle data".
Currently color handle isn't read in common entity handle data
(although I'm not sure my specification readings are correct).

Sample r18 object (try decoding on paper)
line (13h) (size:59)
00110111 00000000 01000100 11100101 01000000 01000000 00000000 00000000
10000000 11001111 01100001 01000000 00000010 00000000 00000000 00000000
00000000 00000101 00001000 01111011 01010001 00010011 00000111 10100101
01001101 00000010 11110100 10000001 10111101 01011111 01111010 11001001
01011100 00000101 10111110 00100000 01110011 00100011 10011001 01110011
11010001 11010111 00110101 00100000 01101001 00000000 10000100 01101001
01111111 10111010 11101100 11101000 00011110 00001000 10100010 10001100
11111111 01110100 10001001
crc c1:8974 c2:8974 crcsize:57

Bye



reply via email to

[Prev in Thread] Current Thread [Next in Thread]