def __init__(self, shape=None, characterid=None): """ Constructor. :param shapes: """ self.shape = ShapeWithStyle() if shape is None else shape self.characterid = characterid
class DefineShape(SwfTag): id = 2 min_version = 1 variant = 1 _current_variant = None implements(IPlaceable) def __init__(self, shape=None, characterid=None): """ Constructor. :param shapes: """ self.shape = ShapeWithStyle() if shape is None else shape self.characterid = characterid def add_to(self, data): super(DefineShape, self).add_to(data) self.characterid = self.shape.characterid = data.next_character_id data.next_character_id += 1 def serialize_data(self): DefineShape._current_variant = self.variant self.shape.calculate_bounds() bits = BitStream() bits.write(self.characterid, UI16) bits += self.shape.shape_bounds bits += self.shape DefineShape._current_variant = None return bits.serialize()
def __init__(self): self.shape = ShapeWithStyle() self.graphics = SwfGraphicsEmulation(self.shape)