- version:aspose-slides-cpp-windows-23.1
- The fill color obtained by the following code is incorrect
void PrintFillFormat(System::String pptFilePath)
{
System::SharedPtr<System::IO::FileStream> stream = System::MakeObject<System::IO::FileStream>(pptFilePath, System::IO::FileMode::Open, System::IO::FileAccess::Read, System::IO::FileShare::ReadWrite);
System::SharedPtr<Aspose::Slides::Presentation> presentation = System::MakeObject<Aspose::Slides::Presentation>(stream);
System::SharedPtr<ISlideCollection> slides = presentation->get_Slides();
for (int slideIdx = 0; slideIdx < slides->get_Count(); slideIdx++)
{
System::SharedPtr<Aspose::Slides::ISlide> slide = slides->idx_get(slideIdx);
System::SharedPtr<IShapeCollection> shapes = slide->get_Shapes();
for (int i = 0, n = shapes->get_Count(); i < n; i++)
{
System::SharedPtr<IShape> shape = shapes->idx_get(i);
System::SharedPtr<IFillFormatEffectiveData> fillFormat = shape->get_FillFormat()->GetEffective();
Aspose::Slides::FillType fillType = fillFormat->get_FillType();
if (fillType == Aspose::Slides::FillType::Solid) {
System::Drawing::Color color = fillFormat->get_SolidFillColor();
System::Console::WriteLine(u"color:{0}", color);
}
}
}
}
- Code console output:“color:Color [A=255, R=175, G=171, B=171]”,The right transparency is A=0
ppt file:fillformat.zip (27.7 KB)