Aspose::Words::Drawing::Stroke class
Contents
[
Hide
]Stroke class
Defines a stroke for a shape. To learn more, visit the Working with Shapes documentation article.
class Stroke : public Aspose::Words::Drawing::Core::IFillable
Methods
Method | Description |
---|---|
get_BackColor() | Gets or sets the background color of the stroke. |
get_BackThemeColor() | |
get_BackTintAndShade() | |
get_BaseForeColor() | |
get_Color() | Defines the color of a stroke. |
get_Color2() | Defines a second color for a stroke. |
get_DashStyle() | Specifies the dot and dash pattern for a stroke. |
get_EndArrowLength() | Defines the arrowhead length for the end of a stroke. |
get_EndArrowType() | Defines the arrowhead for the end of a stroke. |
get_EndArrowWidth() | Defines the arrowhead width for the end of a stroke. |
get_EndCap() | Defines the cap style for the end of a stroke. |
get_Fill() | Gets fill formatting for the Stroke. |
get_ForeColor() | Gets or sets the foreground color of the stroke. |
get_ForeThemeColor() | |
get_ForeTintAndShade() | |
get_ImageBytes() | Defines the image for a stroke image or pattern fill. |
get_JoinStyle() | Defines the join style of a polyline. |
get_LineStyle() | Defines the line style of the stroke. |
get_On() | Defines whether the path will be stroked. |
get_Opacity() | Defines the amount of transparency of a stroke. Valid range is from 0 to 1. |
get_StartArrowLength() | Defines the arrowhead length for the start of a stroke. |
get_StartArrowType() | Defines the arrowhead for the start of a stroke. |
get_StartArrowWidth() | Defines the arrowhead width for the start of a stroke. |
get_Transparency() | Gets or sets a value between 0.0 (opaque) and 1.0 (clear) representing the degree of transparency of the stroke. |
get_Visible() | Gets or sets a flag indicating whether the stroke is visible. |
get_Weight() | Defines the brush thickness that strokes the path of a shape in points. |
GetType() const override | |
Is(const System::TypeInfo&) const override | |
set_BackColor(System::Drawing::Color) | Setter for Aspose::Words::Drawing::Stroke::get_BackColor. |
set_BackThemeColor(Aspose::Words::Themes::ThemeColor) | |
set_BackTintAndShade(double) | |
set_Color(System::Drawing::Color) | Setter for Aspose::Words::Drawing::Stroke::get_Color. |
set_Color2(System::Drawing::Color) | Setter for Aspose::Words::Drawing::Stroke::get_Color2. |
set_DashStyle(Aspose::Words::Drawing::DashStyle) | Setter for Aspose::Words::Drawing::Stroke::get_DashStyle. |
set_EndArrowLength(Aspose::Words::Drawing::ArrowLength) | Setter for Aspose::Words::Drawing::Stroke::get_EndArrowLength. |
set_EndArrowType(Aspose::Words::Drawing::ArrowType) | Setter for Aspose::Words::Drawing::Stroke::get_EndArrowType. |
set_EndArrowWidth(Aspose::Words::Drawing::ArrowWidth) | Setter for Aspose::Words::Drawing::Stroke::get_EndArrowWidth. |
set_EndCap(Aspose::Words::Drawing::EndCap) | Setter for Aspose::Words::Drawing::Stroke::get_EndCap. |
set_ForeColor(System::Drawing::Color) | Setter for Aspose::Words::Drawing::Stroke::get_ForeColor. |
set_ForeThemeColor(Aspose::Words::Themes::ThemeColor) | |
set_ForeTintAndShade(double) | |
set_JoinStyle(Aspose::Words::Drawing::JoinStyle) | Setter for Aspose::Words::Drawing::Stroke::get_JoinStyle. |
set_LineStyle(Aspose::Words::Drawing::ShapeLineStyle) | Setter for Aspose::Words::Drawing::Stroke::get_LineStyle. |
set_On(bool) | Setter for Aspose::Words::Drawing::Stroke::get_On. |
set_Opacity(double) | Setter for Aspose::Words::Drawing::Stroke::get_Opacity. |
set_StartArrowLength(Aspose::Words::Drawing::ArrowLength) | Setter for Aspose::Words::Drawing::Stroke::get_StartArrowLength. |
set_StartArrowType(Aspose::Words::Drawing::ArrowType) | Setter for Aspose::Words::Drawing::Stroke::get_StartArrowType. |
set_StartArrowWidth(Aspose::Words::Drawing::ArrowWidth) | Setter for Aspose::Words::Drawing::Stroke::get_StartArrowWidth. |
set_Transparency(double) | Setter for Aspose::Words::Drawing::Stroke::get_Transparency. |
set_Visible(bool) | Setter for Aspose::Words::Drawing::Stroke::get_Visible. |
set_Weight(double) | Setter for Aspose::Words::Drawing::Stroke::get_Weight. |
static Type() |
Remarks
Use the Stroke property to access stroke properties of a shape. You do not create instances of the Stroke class directly.
Examples
Shows how change stroke properties.
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
SharedPtr<Shape> shape = builder->InsertShape(ShapeType::Rectangle, RelativeHorizontalPosition::LeftMargin, 100, RelativeVerticalPosition::TopMargin,
100, 200, 200, WrapType::None);
// Basic shapes, such as the rectangle, have two visible parts.
// 1 - The fill, which applies to the area within the outline of the shape:
shape->get_Fill()->set_ForeColor(System::Drawing::Color::get_White());
// 2 - The stroke, which marks the outline of the shape:
// Modify various properties of this shape's stroke.
SharedPtr<Stroke> stroke = shape->get_Stroke();
stroke->set_On(true);
stroke->set_Weight(5);
stroke->set_Color(System::Drawing::Color::get_Red());
stroke->set_DashStyle(DashStyle::ShortDashDotDot);
stroke->set_JoinStyle(JoinStyle::Miter);
stroke->set_EndCap(EndCap::Square);
stroke->set_LineStyle(ShapeLineStyle::Triple);
doc->Save(ArtifactsDir + u"Shape.Stroke.docx");
See Also
- Namespace Aspose::Words::Drawing
- Library Aspose.Words for C++