Aspose::Words::Font::HasDmlEffect method
Font::HasDmlEffect method
Checks if particular DrawingML text effect is applied.
bool Aspose::Words::Font::HasDmlEffect(Aspose::Words::TextDmlEffect dmlEffectType)
Parameter | Type | Description |
---|---|---|
dmlEffectType | Aspose::Words::TextDmlEffect | DrawingML text effect type. |
ReturnValue
true if particular DrawingML text effect is applied.
Examples
Shows how to check if a run displays a DrawingML text effect.
auto doc = MakeObject<Document>(MyDir + u"DrawingML text effects.docx");
SharedPtr<RunCollection> runs = doc->get_FirstSection()->get_Body()->get_FirstParagraph()->get_Runs();
ASSERT_TRUE(runs->idx_get(0)->get_Font()->HasDmlEffect(TextDmlEffect::Shadow));
ASSERT_TRUE(runs->idx_get(1)->get_Font()->HasDmlEffect(TextDmlEffect::Shadow));
ASSERT_TRUE(runs->idx_get(2)->get_Font()->HasDmlEffect(TextDmlEffect::Reflection));
ASSERT_TRUE(runs->idx_get(3)->get_Font()->HasDmlEffect(TextDmlEffect::Effect3D));
ASSERT_TRUE(runs->idx_get(4)->get_Font()->HasDmlEffect(TextDmlEffect::Fill));
See Also
- Enum TextDmlEffect
- Class Font
- Namespace Aspose::Words
- Library Aspose.Words for C++