Beispiel #1
0
 def transparency(self, value: float) -> None:
     # create AppID table entry if not present
     if self.doc and AcCmTransparency not in self.doc.appids:
         self.doc.appids.new(AcCmTransparency)
     if 0 <= value <= 1:
         self.discard_xdata(AcCmTransparency)
         self.set_xdata(AcCmTransparency,
                        [(1071, float2transparency(value))])
     else:
         raise ValueError('Value out of range (0 .. 1).')
Beispiel #2
0
 def transparency(self, transparency):
     # 0.0 = opaque & 1.0 if 100% transparent
     self.set_dxf_attrib('transparency', float2transparency(transparency))
Beispiel #3
0
 def transparency(self, transparency: float) -> None:
     """ Set transparency as float value between 0 and 1, 0 is opaque and 1 is 100% transparent (invisible). """
     self.dxf.set('transparency', float2transparency(transparency))