- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
class ImageAsset(Asset):
def to_xml(self):
if self.asset_type == self.VIDEO:
return self.videoasset.to_xml()
element = etree.Element("imageAsset")
if self.mask_key:
element.set("maskId", self.mask_key)
if self.image_x:
element.set("imageX", str(self.image_x))
if self.image_y:
element.set("imageY", str(self.image_y))
if self.image_width:
element.set("imageWidth", str(self.image_width))
if self.image_height:
element.set("imageHeight", str(self.image_height))
self.set_xml_attrs(element)
return element
class VideoAsset(ImageAsset):
def to_xml(self):
element = etree.Element("videoAsset")
if self.mask_key:
element.set("maskId", self.mask_key)
if self.image_x:
element.set("imageX", str(self.image_x))
if self.image_y:
element.set("imageY", str(self.image_y))
if self.image_width:
element.set("imageWidth", str(self.image_width))
if self.image_height:
element.set("imageHeight", str(self.image_height))
self.set_xml_attrs(element)
return element
Комментарии (0) RSS
Добавить комментарий