查看单个帖子
旧 2009-05-06, 07:12 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)