AddMediaPlaceholder()

LayoutPlaceholderManager::AddMediaPlaceholder(float, float, float, float) method

Adds a new placeholder shape to the layout slide to hold a media object.

System::SharedPtr<IAutoShape> Aspose::Slides::LayoutPlaceholderManager::AddMediaPlaceholder(float x, float y, float width, float height) override

Arguments

ParameterTypeDescription
xfloatThe X coordinate of the new placeholder shape.
yfloatThe Y coordinate of the new placeholder shape.
widthfloatThe width of the new placeholder shape.
heightfloatThe height of the new placeholder shape.

Return Value

Created IAutoShape with a Media placeholder.

Remarks

The following example shows how to add the Media placeholder shape to the layout slide.

System::SharedPtr<Presentation> pres = System::MakeObject<Presentation>();

System::SharedPtr<ILayoutSlide> layout = pres->get_LayoutSlides()->GetByType(SlideLayoutType::Blank);
System::SharedPtr<IAutoShape> placeholder = layout->get_PlaceholderManager()->AddMediaPlaceholder(20.0f, 20.0f, 200.0f, 200.0f);

See Also