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

odcmtransparency and entity transparency
odcmtransparency and entity transparency
hallo
how do i determine the alpha (transparency) value of an entity? i retrieve the transparency setting for an entity using
odcmtransparency alpha = pent->transparency();
the method returns 0 - transparency using the layer. how do i then actually get the transparency of the layer - materials,colour, something else? i am stuck on this.
thanks
anton
if entity's property is bylayer than you need to get it using layer's methods like oddblayertablerecord::color() etc.
as for layer's transparency oddblayertablerecord transparency() and settransparency() are not yet implemented in dwgdirect.
layer's transparency is stored as layer's xdata and you can get it from xdata "manually". the transparency xdata format is:
1001 "accmtransparency" - string (application name)
1071 nnnn - int32 - value
the int32 value can be used by odcmtransparency functions serializein() and serializeout().
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)