Aspose::Words::Drawing::HorizontalRuleFormat::get_Height method
HorizontalRuleFormat::get_Height method
Gets or sets the height of the horizontal rule.
double Aspose::Words::Drawing::HorizontalRuleFormat::get_Height()
Remarks
This is a shortcut to the Height property.
Valid values range from 0 to 1584 inclusive.
The default value is 1.5.
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
- Class HorizontalRuleFormat
- Namespace Aspose::Words::Drawing
- Library Aspose.Words for C++