Aspose::Words::Drawing::GlowFormat class

GlowFormat class

Represents the glow formatting for an object.

class GlowFormat : public System::Object

Methods

MethodDescription
get_Color()Gets or sets a Color object that represents the color for a glow effect. The default value is Black.
get_Radius()Gets or sets a double value that represents the length of the radius for a glow effect in points (pt). The default value is 0.0.
get_Transparency()Gets or sets the degree of transparency for the glow effect as a value between 0.0 (opaque) and 1.0 (clear). The default value is 0.0.
GetType() const override
Is(const System::TypeInfo&) const override
Remove()Removes GlowFormat from the parent object.
set_Color(System::Drawing::Color)Setter for Aspose::Words::Drawing::GlowFormat::get_Color.
set_Radius(double)Setter for Aspose::Words::Drawing::GlowFormat::get_Radius.
set_Transparency(double)Setter for Aspose::Words::Drawing::GlowFormat::get_Transparency.
static Type()

Remarks

Use the Glow property to access glow properties of an object. You do not create instances of the GlowFormat class directly.

Examples

Shows how to interact with glow shape effect.

auto doc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Various shapes.docx");
auto shape = System::ExplicitCast<Aspose::Words::Drawing::Shape>(doc->GetChild(Aspose::Words::NodeType::Shape, 0, true));

shape->get_Glow()->set_Color(System::Drawing::Color::get_Salmon());
shape->get_Glow()->set_Radius(30);
shape->get_Glow()->set_Transparency(0.15);

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

doc = System::MakeObject<Aspose::Words::Document>(get_ArtifactsDir() + u"Shape.Glow.docx");
shape = System::ExplicitCast<Aspose::Words::Drawing::Shape>(doc->GetChild(Aspose::Words::NodeType::Shape, 0, true));

ASSERT_EQ(System::Drawing::Color::FromArgb(217, 250, 128, 114).ToArgb(), shape->get_Glow()->get_Color().ToArgb());
ASPOSE_ASSERT_EQ(30, shape->get_Glow()->get_Radius());
ASSERT_NEAR(0.15, shape->get_Glow()->get_Transparency(), 0.01);

shape->get_Glow()->Remove();

ASSERT_EQ(System::Drawing::Color::get_Black().ToArgb(), shape->get_Glow()->get_Color().ToArgb());
ASPOSE_ASSERT_EQ(0, shape->get_Glow()->get_Radius());
ASPOSE_ASSERT_EQ(0, shape->get_Glow()->get_Transparency());

See Also