Aspose::Words::Font::get_Shading method
Font::get_Shading method
Returns a Shading object that refers to the shading formatting for the font.
System::SharedPtr<Aspose::Words::Shading> Aspose::Words::Font::get_Shading()
Examples
Shows how to apply shading to text created by a document builder.
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->get_Font()->set_Color(System::Drawing::Color::get_White());
// One way to make the text created using our white font color visible
// is to apply a background shading effect.
SharedPtr<Shading> shading = builder->get_Font()->get_Shading();
shading->set_Texture(TextureIndex::TextureDiagonalUp);
shading->set_BackgroundPatternColor(System::Drawing::Color::get_OrangeRed());
shading->set_ForegroundPatternColor(System::Drawing::Color::get_DarkBlue());
builder->Writeln(u"White text on an orange background with a two-tone texture.");
doc->Save(ArtifactsDir + u"Font.Shading.docx");
See Also
- Class Shading
- Class Font
- Namespace Aspose::Words
- Library Aspose.Words for C++