几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】odcmtransparency and entity transparency (http://www.dimcax.com/hust/showthread.php?t=17444)

yang686526 2009-05-06 07:14 PM

【转帖】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


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