![]() |
【转帖】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. |
所有的时间均为北京时间。 现在的时间是 12:32 AM. |