Beispiel #1
0
 def _new_placeholder_pic(self, image_file):
     """
     Return a new `p:pic` element depicting the image in *image_file*,
     suitable for use as a placeholder. In particular this means not
     having an `a:xfrm` element, allowing its extents to be inherited from
     its layout placeholder.
     """
     rId, desc, image_size = self._get_or_add_image(image_file)
     shape_id, name = self.shape_id, self.name
     pic = CT_Picture.new_ph_pic(shape_id, name, desc, rId)
     pic.crop_to_fit(image_size, (self.width, self.height))
     return pic