几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】odcmcolorcolorindex90 return 0 (http://www.dimcax.com/hust/showthread.php?t=17438)

yang686526 2009-05-06 07:12 PM

【转帖】odcmcolorcolorindex90 return 0
 
odcmcolor::colorindex() return 0
odcmcolor::colorindex() return 0
i use dwgdirect 1.08.
there is a problem with following code:
[code]
odcmlookupaci (dwcolor, (dwcolor) ? false : true)
</pre><hr></blockquote>
if dwcolor is closed to "black" (for example rgb(1, 0, 0) or rgb(37, 0, 0)) this function return not a nearest color index but "0", that mean "byblock". it isn't right. for these colors arx return index "18".
same problem occur with following code:
[code]
odcmcolor cmcolor;
cmcolor.setrgb(getrvalue(dwcolor), getgvalue(dwcolor), getbvalue(dwcolor));
cmcolor.colorindex();
</pre><hr></blockquote>
best regards,
ivan obraztsov

thanks for pointing it out. it's our bug.
sergey slezkin


所有的时间均为北京时间。 现在的时间是 09:17 PM.