check layer transparency value for valid flag 0x2000000
@@ -285,7 +285,12 @@ class Layer(DXFEntity):
except DXFValueError:
return 0.0
else:
- return clr.transparency2float(xdata[0].value)
+ t = xdata[0].value
+ print(hex(t))
+ if t & 0x2000000: # is this a real transparency value?
+ # Transparency BYBLOCK (0x01000000) make no sense for a layer!
+ return clr.transparency2float(t)
+ return 0.0
@transparency.setter
def transparency(self, value: float) -> None:
