Aspose::Words::Drawing::SoftEdgeFormat class

SoftEdgeFormat class

Represents the soft edge formatting for an object.

class SoftEdgeFormat : public System::Object

Methods

MethodDescription
get_Radius()Gets or sets a double value that represents the length of the radius for a soft edge effect in points (pt). The default value is 0.0.
GetType() const override
Is(const System::TypeInfo&) const override
Remove()Removes SoftEdgeFormat from the parent object.
set_Radius(double)Setter for Aspose::Words::Drawing::SoftEdgeFormat::get_Radius.
static Type()

Remarks

Use the SoftEdge property to access soft edge properties of an object. You do not create instances of the SoftEdgeFormat class directly.

Examples

Shows how to work with soft edge formatting.

auto builder = System::MakeObject<Aspose::Words::DocumentBuilder>();
System::SharedPtr<Aspose::Words::Drawing::Shape> shape = builder->InsertShape(Aspose::Words::Drawing::ShapeType::Rectangle, 200, 200);

// Apply soft edge to the shape.
shape->get_SoftEdge()->set_Radius(30);

builder->get_Document()->Save(get_ArtifactsDir() + u"Shape.SoftEdge.docx");

// Load document with rectangle shape with soft edge.
auto doc = System::MakeObject<Aspose::Words::Document>(get_ArtifactsDir() + u"Shape.SoftEdge.docx");
shape = System::ExplicitCast<Aspose::Words::Drawing::Shape>(doc->GetChild(Aspose::Words::NodeType::Shape, 0, true));
System::SharedPtr<Aspose::Words::Drawing::SoftEdgeFormat> softEdgeFormat = shape->get_SoftEdge();

// Check soft edge radius.
ASPOSE_ASSERT_EQ(30, softEdgeFormat->get_Radius());

// Remove soft edge from the shape.
softEdgeFormat->Remove();

// Check radius of the removed soft edge.
ASPOSE_ASSERT_EQ(0, softEdgeFormat->get_Radius());

See Also