AlignShapes()
Contents
[
Hide
]SlideUtil::AlignShapes(ShapesAlignmentType, bool, System::SharedPtr<IBaseSlide>) method
Changes the placement of all shapes on the slide. Aligns shapes to the margins or the edge of the slide or align them relative to each other.
static void Aspose::Slides::Util::SlideUtil::AlignShapes(ShapesAlignmentType alignmentType, bool alignToSlide, System::SharedPtr<IBaseSlide> slide)
Arguments
Parameter | Type | Description |
---|---|---|
alignmentType | ShapesAlignmentType | Determines which type of alignment will be applied. |
alignToSlide | bool | If true, shapes will be aligned relative to the slide edges. |
slide | System::SharedPtr<IBaseSlide> | Parent slide. |
Remarks
Example:
System::SharedPtr<Presentation> pres = System::MakeObject<Presentation>(u"pres.pptx");
SlideUtil::AlignShapes(Aspose::Slides::ShapesAlignmentType::AlignBottom, true, pres->get_Slides()->idx_get(0));
SlideUtil::AlignShapes(ShapesAlignmentType, bool, System::SharedPtr<IBaseSlide>, System::ArrayPtr<int32_t>) method
Changes the placement of selected shapes on the slide. Aligns shapes to the margins or the edge of the slide or align them relative to each other.
static void Aspose::Slides::Util::SlideUtil::AlignShapes(ShapesAlignmentType alignmentType, bool alignToSlide, System::SharedPtr<IBaseSlide> slide, System::ArrayPtr<int32_t> shapeIndexes)
Arguments
Parameter | Type | Description |
---|---|---|
alignmentType | ShapesAlignmentType | Determines which type of alignment will be applied. |
alignToSlide | bool | If true, shapes will be aligned relative to the slide edges. |
slide | System::SharedPtr<IBaseSlide> | Parent slide. |
shapeIndexes | System::ArrayPtr<int32_t> | Indexes of shapes to be aligned. |
Remarks
Example:
auto pres = System::MakeObject<Presentation>(u"pres.pptx");
auto slide = pres->get_Slides()->idx_get(0);
auto shape1 = slide->get_Shapes()->idx_get(0);
auto shape2 = slide->get_Shapes()->idx_get(1);
SlideUtil::AlignShapes(Aspose::Slides::ShapesAlignmentType::AlignBottom, false, pres->get_Slides()->idx_get(0),
System::MakeArray<int32_t>({
slide->get_Shapes()->IndexOf(shape1),
slide->get_Shapes()->IndexOf(shape2)
}));
SlideUtil::AlignShapes(ShapesAlignmentType, bool, System::SharedPtr<IGroupShape>) method
Changes the placement of all shapes within group shape. Aligns shapes to the margins or the edge of the slide or align them relative to each other.
static void Aspose::Slides::Util::SlideUtil::AlignShapes(ShapesAlignmentType alignmentType, bool alignToSlide, System::SharedPtr<IGroupShape> groupShape)
Arguments
Parameter | Type | Description |
---|---|---|
alignmentType | ShapesAlignmentType | Determines which type of alignment will be applied. |
alignToSlide | bool | If true, shapes will be aligned relative to the slide edges. |
groupShape | System::SharedPtr<IGroupShape> | Parent group shape. |
Remarks
Example:
System::SharedPtr<Presentation> pres = System::MakeObject<Presentation>(u"pres.pptx");
SlideUtil::AlignShapes(Aspose::Slides::ShapesAlignmentType::AlignLeft, false, System::ExplicitCast<Aspose::Slides::GroupShape>(pres->get_Slides()->idx_get(0)->get_Shapes()));
SlideUtil::AlignShapes(ShapesAlignmentType, bool, System::SharedPtr<IGroupShape>, System::ArrayPtr<int32_t>) method
Changes the placement of selected shapes within group shape. Aligns shapes to the margins or the edge of the slide or align them relative to each other.
static void Aspose::Slides::Util::SlideUtil::AlignShapes(ShapesAlignmentType alignmentType, bool alignToSlide, System::SharedPtr<IGroupShape> groupShape, System::ArrayPtr<int32_t> shapeIndexes)
Arguments
Parameter | Type | Description |
---|---|---|
alignmentType | ShapesAlignmentType | Determines which type of alignment will be applied. |
alignToSlide | bool | If true, shapes will be aligned relative to the slide edges. |
groupShape | System::SharedPtr<IGroupShape> | Parent group shape. |
shapeIndexes | System::ArrayPtr<int32_t> | Indexes of shapes to be aligned. |
Remarks
Example:
System::SharedPtr<Presentation> pres = System::MakeObject<Presentation>(u"pres.pptx");
SlideUtil::AlignShapes(Aspose::Slides::ShapesAlignmentType::AlignLeft, false, System::ExplicitCast<Aspose::Slides::GroupShape>(pres->get_Slides()->idx_get(0)->get_Shapes()->idx_get(0)), System::MakeArray<int32_t>({0, 2}));
See Also
- Enum ShapesAlignmentType
- Typedef SharedPtr
- Typedef ArrayPtr
- Class IBaseSlide
- Class SlideUtil
- Class IGroupShape
- Namespace Aspose::Slides::Util
- Library Aspose.Slides