查看单个帖子
旧 2009-05-06, 09:18 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】od-cm-entity-color vs od-cm-color

od_cm_entity_color vs od_cm_color
od_cm_entity_color vs od_cm_color
od_cm_entity_color is not derived from od_cm_color.
od_cm_entity_color is documented as "represents the color of a database entity (oddbentity)."
but when you look at oddbentity, then it uses odcmcolor:
oddbentity::setcolor(const odcmcolor &color, bool dosubents = true)
how do you set an entity to "odcmentitycolor::kbyblock"?
-rune jorgensen
www.dds.no
does pent->setcolorindex(0) not work for this? i believe 0 is by block and that should do it.
> does pent->setcolorindex(0) not work for this?
> i believe 0 is by block and that should do it.
where is that documented? implicit in the dxf spec? what then is the purpose of "kbylayer"?
how about:
odcmcolor
col;
col.setcolormethod(odcmentitycolor::kbylayer);
pentity->setcolor(col);
the problem is that i am guessing. further work on the api doc and faq would be welcome.
but the new toolkit itself looks very .
-rune jorgensen
www.dds.no
in a block definition, an object of color "bylayer" will take on the color assigned to whatever layer said object is on, unless the object is on layer 0, in which case the object will take on the color of whatever layer the block reference is on. any color assigned to the block reference is ignored.
in a block definition, an object of color "byblock" will take on the color assigned to the block reference.
hope this helps.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)