Adding a rotated shape to a group moves shape outside of group. Using Aspose.Slide.Cpp 23.3.
auto pres = System::MakeObject<Slides::Presentation>();
auto group = pres->get_Slides()->idx_get(0)->get_Shapes()->AddGroupShape();
auto shape1 = group->get_Shapes()->AddAutoShape(Slides::ShapeType::Rectangle, 0, 0, 100, 100);
auto shape2 = group->get_Shapes()->AddAutoShape(Slides::ShapeType::Rectangle, 100, 0, 100, 100);
shape2->set_Rotation(45);
pres->Save(u"Presentation2.pptx", Slides::Export::SaveFormat::Pptx);
Using set_Frame()
with rotation on the shape doesn’t change the output. Using set_Frame()
on group to adjust the frame (I know correct group’s frame in my app), distorts the shapes and the rotated shape is still pocking out of the group frame.