Aspose::Words::Drawing::HorizontalRuleFormat class
Contents
[
Hide
]HorizontalRuleFormat class
Represents horizontal rule formatting. To learn more, visit the Working with Shapes documentation article.
class HorizontalRuleFormat : public System::Object
Methods
Method | Description |
---|---|
get_Alignment() | Gets or sets the alignment of the horizontal rule. |
get_Color() | Gets or sets the brush color that fills the horizontal rule. |
get_Height() | Gets or sets the height of the horizontal rule. |
get_NoShade() | Indicates the presence of 3D shading for the horizontal rule. If true, then the horizontal rule is without 3D shading and solid color is used. |
get_WidthPercent() | Gets or sets the length of the specified horizontal rule expressed as a percentage of the window width. |
GetType() const override | |
Is(const System::TypeInfo&) const override | |
set_Alignment(Aspose::Words::Drawing::HorizontalRuleAlignment) | Setter for Aspose::Words::Drawing::HorizontalRuleFormat::get_Alignment. |
set_Color(System::Drawing::Color) | Setter for Aspose::Words::Drawing::HorizontalRuleFormat::get_Color. |
set_Height(double) | Setter for Aspose::Words::Drawing::HorizontalRuleFormat::get_Height. |
set_NoShade(bool) | Setter for Aspose::Words::Drawing::HorizontalRuleFormat::get_NoShade. |
set_WidthPercent(double) | Setter for Aspose::Words::Drawing::HorizontalRuleFormat::get_WidthPercent. |
static Type() |
Examples
Shows how to insert a horizontal rule shape, and customize its formatting.
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
SharedPtr<Shape> shape = builder->InsertHorizontalRule();
SharedPtr<HorizontalRuleFormat> horizontalRuleFormat = shape->get_HorizontalRuleFormat();
horizontalRuleFormat->set_Alignment(HorizontalRuleAlignment::Center);
horizontalRuleFormat->set_WidthPercent(70);
horizontalRuleFormat->set_Height(3);
horizontalRuleFormat->set_Color(System::Drawing::Color::get_Blue());
horizontalRuleFormat->set_NoShade(true);
ASSERT_TRUE(shape->get_IsHorizontalRule());
ASSERT_TRUE(shape->get_HorizontalRuleFormat()->get_NoShade());
See Also
- Namespace Aspose::Words::Drawing
- Library Aspose.Words for C++