Aspose::Words::Drawing::Fill::get_BackThemeColor method

Fill::get_BackThemeColor method

Gets or sets a ThemeColor object that represents the background color for the fill.

Aspose::Words::Themes::ThemeColor Aspose::Words::Drawing::Fill::get_BackThemeColor()

Examples

Shows how to set theme color for foreground/background shape color.

auto doc = System::MakeObject<Aspose::Words::Document>();
auto builder = System::MakeObject<Aspose::Words::DocumentBuilder>(doc);

System::SharedPtr<Aspose::Words::Drawing::Shape> shape = builder->InsertShape(ShapeType::RoundRectangle, static_cast<double>(80), static_cast<double>(80));

System::SharedPtr<Aspose::Words::Drawing::Fill> fill = shape->get_Fill();
fill->set_ForeThemeColor(ThemeColor::Dark1);
fill->set_BackThemeColor(ThemeColor::Background2);

// Note: do not use "BackThemeColor" and "BackTintAndShade" for font fill.
if (fill->get_BackTintAndShade() == 0)
{
    fill->set_BackTintAndShade(0.2);
}

doc->Save(get_ArtifactsDir() + u"Shape.FillThemeColor.docx");

See Also