Stroke Class |
Namespace: Aspose.Words.Drawing
The Stroke type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | Color |
Defines the color of a stroke.
|
![]() ![]() | Color2 |
Defines a second color for a stroke.
|
![]() ![]() | DashStyle |
Specifies the dot and dash pattern for a stroke.
|
![]() ![]() | EndArrowLength |
Defines the arrowhead length for the end of a stroke.
|
![]() ![]() | EndArrowType |
Defines the arrowhead for the end of a stroke.
|
![]() ![]() | EndArrowWidth |
Defines the arrowhead width for the end of a stroke.
|
![]() ![]() | EndCap |
Defines the cap style for the end of a stroke.
|
![]() ![]() | ImageBytes |
Defines the image for a stroke image or pattern fill.
|
![]() ![]() | JoinStyle |
Defines the join style of a polyline.
|
![]() ![]() | LineStyle |
Defines the line style of the stroke.
|
![]() ![]() | On |
Defines whether the path will be stroked.
|
![]() ![]() | Opacity |
Defines the amount of transparency of a stroke. Valid range is from 0 to 1.
|
![]() ![]() | StartArrowLength |
Defines the arrowhead length for the start of a stroke.
|
![]() ![]() | StartArrowType |
Defines the arrowhead for the start of a stroke.
|
![]() ![]() | StartArrowWidth |
Defines the arrowhead width for the start of a stroke.
|
![]() ![]() | Weight |
Defines the brush thickness that strokes the path of a shape in points.
|
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
Use the Stroke property to access stroke properties of a shape. You do not create instances of the Stroke class directly.
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); // Create a new shape of type Rectangle Shape rectangle = new Shape(doc, ShapeType.Rectangle); // Change stroke properties Stroke stroke = rectangle.Stroke; stroke.On = true; stroke.Weight = 5; stroke.Color = Color.Red; stroke.DashStyle = DashStyle.ShortDashDotDot; stroke.JoinStyle = JoinStyle.Miter; stroke.EndCap = EndCap.Square; stroke.LineStyle = ShapeLineStyle.Triple; // Insert shape object builder.InsertNode(rectangle);