![]() |
【转帖】oddblayertablerecordcolor90 returns incorrect color value
oddblayertablerecord::color() returns incorrect color value
oddblayertablerecord::color() returns incorrect color value the attached file contains a line with bylayer color. layer color is rgb 38, 19, 19(in autocad2008). when i try to dump this color i recieve rgb 76, 38, 38 here is my code: code: odcmcolor odlayercolor = odlayer->color(); layercolor.red = odlayercolor.red(); // 76 layercolor.grn = odlayercolor.green(); // 38 layercolor.blu = odlayercolor.blue(); // 38is it a bug or am i doing something wrong? (may be related to #4891) attached files in your sample layer has color specified by aci (autocad color index) 19. color indices 8-277 are described as "defined by display device" autocad uses 2 color palettes: for dark and light backgrounds. for example color 7 is white on dark background and black on light background. color 19 is (38,19,19) on light background and (76,38,38) on dark background. btw, different acad version use slightly different palettes. sergey slezkin i am creating a dwg file(version r12!!!) with a line. i set color to (0, 0, 0). and when i open a dwg file i recieve line color 18 (38, 0, 0). also lineweight is not supported for r12. i set to klnwt120 and recieve by layer(default). is it related to quote: originally posted by sergey slezkin btw, different acad version use slightly different palettes. ? notice, that all other versions work correctly. the same will happen if you do it in autocad. 1. early autocad versions do not support true color - only aci. where is no black (0,0,0) color in ac palette. the closest color is 18. 2. early autocad versions do not support lineweight. unlike r13+ versions where is no possibility to save true color and lineweight round-trip information in r12 format. sergey slezkin |
所有的时间均为北京时间。 现在的时间是 04:01 PM. |