Aspose::Words::Drawing::ShadowFormat class

ShadowFormat class

Represents shadow formatting for an object. To learn more, visit the Working with Graphic Elements documentation article.

class ShadowFormat : public System::Object

Methods

MethodDescription
Clear()Clears shadow format.
get_Color()Gets or sets a Color object that represents the color for the shadow. The default value is Black.
get_Transparency()Gets or sets the degree of transparency for the shadow effect as a value between 0.0 (opaque) and 1.0 (clear). The default value is 0.0.
get_Type()Gets or sets the specified ShadowType for ShadowFormat.
get_Visible()Returns true if the formatting applied to this instance is visible.
set_Color(System::Drawing::Color)Sets a Color object that represents the color for the shadow. The default value is Black.
set_Transparency(double)Sets the degree of transparency for the shadow effect as a value between 0.0 (opaque) and 1.0 (clear). The default value is 0.0.
set_Type(Aspose::Words::Drawing::ShadowType)Sets the specified ShadowType for ShadowFormat.

Examples

Shows how to get shadow color.

auto doc = System::MakeObject<Aspose::Words::Document>(System::String(get_MyDir() + u"Shadow color.docx"));
auto shape = System::ExplicitCast<Aspose::Words::Drawing::Shape>(doc->GetChild(NodeType::Shape, 0, true));
System::SharedPtr<Aspose::Words::Drawing::ShadowFormat> shadowFormat = shape->get_ShadowFormat();

ASSERT_EQ(shadowFormat->get_Color().ToArgb(), System::Drawing::Color::get_Red().ToArgb());
ASSERT_EQ(shadowFormat->get_Type(), ShadowType::ShadowMixed);

See Also