예제 #1
0
    def __init__(self, shape=None, characterid=None):
        """
        Constructor.

        :param shapes:
        """
        self.shape = ShapeWithStyle() if shape is None else shape
        self.characterid = characterid
예제 #2
0
파일: tags.py 프로젝트: magcius/fusion
    def __init__(self, shape=None, characterid=None):
        """
        Constructor.

        :param shapes:
        """
        self.shape = ShapeWithStyle() if shape is None else shape
        self.characterid = characterid
예제 #3
0
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()
예제 #4
0
파일: tags.py 프로젝트: magcius/fusion
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()
예제 #5
0
파일: core.py 프로젝트: the-one-/fusion
 def __init__(self):
     self.shape = ShapeWithStyle()
     self.graphics = SwfGraphicsEmulation(self.shape)