Aspose::Words::Drawing::Fill::get_BackTintAndShade method
Contents
[
Hide
]Fill::get_BackTintAndShade method
Gets or sets a double value that lightens or darkens the background color.
double Aspose::Words::Drawing::Fill::get_BackTintAndShade()
Remarks
The allowed values are in the range from -1 (the darkest) to 1 (the lightest) for this property.
Zero (0) is neutral.
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(Aspose::Words::Drawing::ShapeType::RoundRectangle, 80, 80);
System::SharedPtr<Aspose::Words::Drawing::Fill> fill = shape->get_Fill();
fill->set_ForeThemeColor(Aspose::Words::Themes::ThemeColor::Dark1);
fill->set_BackThemeColor(Aspose::Words::Themes::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
- Class Fill
- Namespace Aspose::Words::Drawing
- Library Aspose.Words for C++