Paper Office
paper-pptxAPI referenceshapes.picture

Movie

paper-pptx 0.2.0 API reference

A movie shape, one that places a video on a slide.

Like Picture, a movie shape is based on the p:pic element. A movie is composed of a video and a poster frame, the placeholder image that represents the video before it is played.

Attributes

click_action

attributeclick_actionActionSetting

ActionSetting instance providing access to click behaviors.

Click behaviors are hyperlink-like behaviors including jumping to a hyperlink (web page) or to another slide in the presentation. The click action is that defined on the overall shape, not a run of text within the shape. An ActionSetting object is always returned, even when no click behavior is defined on the shape.

crop_bottom

attributecrop_bottomfloat

float representing relative portion cropped from shape bottom.

Read/write. 1.0 represents 100%. For example, 25% is represented by 0.25. Negative values are valid as are values greater than 1.0.

crop_left

attributecrop_leftfloat

float representing relative portion cropped from left of shape.

Read/write. 1.0 represents 100%. A negative value extends the side beyond the image boundary.

crop_right

attributecrop_rightfloat

float representing relative portion cropped from right of shape.

Read/write. 1.0 represents 100%.

crop_top

attributecrop_topfloat

float representing relative portion cropped from shape top.

Read/write. 1.0 represents 100%.

element

attributeelementShapeElement

lxml element for this shape, e.g. a CT_Shape instance.

Note that manipulating this element improperly can produce an invalid presentation file. Make sure you know what you're doing if you use this to change the underlying XML.

has_chart

attributehas_chartbool

True if this shape is a graphic frame containing a chart object.

False otherwise. When True, the chart object can be accessed using the .chart property.

has_table

attributehas_tablebool

True if this shape is a graphic frame containing a table object.

False otherwise. When True, the table object can be accessed using the .table property.

has_text_frame

attributehas_text_framebool

True if this shape can contain text.

height

attributeheightLength

Read/write. Integer distance between top and bottom extents of shape in EMUs.

is_placeholder

attributeis_placeholderbool

True if this shape is a placeholder.

A shape is a placeholder if it has a <p:ph> element.

left

attributeleftLength

Integer distance of the left edge of this shape from the left edge of the slide.

Read/write. Expressed in English Metric Units (EMU)

line

attributelineLineFormat

Provides access to properties of the picture outline, such as its color and width.

ln

attributelnCT_LineProperties | None

The a:ln element for this p:pic.

Contains the line format properties such as line color and width. None if no a:ln element is present.

media_format

attributemedia_format_MediaFormat

The _MediaFormat object for this movie.

The _MediaFormat object provides access to formatting properties for the movie.

media_type

attributemedia_typePP_MEDIA_TYPE

Member of :ref:PpMediaType describing this shape.

The return value is unconditionally PP_MEDIA_TYPE.MOVIE in this case.

name

attributenamestr

Name of this shape, e.g. 'Picture 7'.

part

attributepartBaseSlidePart

The package part containing this shape.

A BaseSlidePart subclass in this case. Access to a slide part should only be required if you are extending the behavior of pp API objects.

placeholder_format

attributeplaceholder_format_PlaceholderFormat

Provides access to placeholder-specific properties such as placeholder type.

Raises ValueError on access if the shape is not a placeholder.

poster_frame

attributeposter_frame

Return Image object containing poster frame for this movie.

Returns None if this movie has no poster frame (uncommon).

rotation

attributerotationfloat

Degrees of clockwise rotation.

Read/write float. Negative values can be assigned to indicate counter-clockwise rotation, e.g. assigning -45.0 will change setting to 315.0.

shadow

attributeshadowShadowFormat

ShadowFormat object providing access to shadow for this shape.

A ShadowFormat object is always returned, even when no shadow is explicitly defined on this shape (i.e. it inherits its shadow behavior).

shape_id

attributeshape_idint

Read-only positive integer identifying this shape.

The id of a shape is unique among all shapes on a slide.

shape_type

attributeshape_typeMSO_SHAPE_TYPE

Return member of :ref:MsoShapeType describing this shape.

The return value is unconditionally MSO_SHAPE_TYPE.MEDIA in this case.

top

attributetopLength

Distance from the top edge of the slide to the top edge of this shape.

Read/write. Expressed in English Metric Units (EMU)

width

attributewidthLength

Distance between left and right extents of this shape.

Read/write. Expressed in English Metric Units (EMU).

Functions

get_or_add_ln

funcget_or_add_ln()

Return the a:ln element for this p:pic-based image.

The a:ln element contains the line format properties XML.

On this page