VegaRise.NET
Back to DOM

OutLineClass

Definition

Namespace
DOM.Elements.Graphics
Assembly
DOM.dll

Represents the outline (stroke) applied to a shape, image, or text effect.

Remarks

defines how the border of a graphical element is drawn: its fill (solid or gradient), width, dash pattern, line cap, compound style, join style, and pen alignment. This class corresponds to the <a:ln> element in DrawingML. OutLine Outlines are used by,, and other graphics primitives that expose an property. Shape !:TextOutlineEffect OutLine

Examples

csharp
1// 1. Simple 1pt solid black outline
2var line = new OutLine
3{
4 SolidFill = Color.Black,
5 Width = new DocumentUnit(1, Units.pt),
6 Dashtype = PresetLineDashValues.Solid
7};
8
csharp
1// 2. Dashed outline with round caps
2var line = new OutLine
3{
4 SolidFill = Color.Red,
5 Width = new DocumentUnit(2, Units.pt),
6 Dashtype = PresetLineDashValues.Dash,
7 CapType = LineCapValues.Round,
8 CompoundType = CompoundLineValues.Single
9};
10
csharp
1// 3. Gradient outline
2var line = new OutLine
3{
4 GradientFill = new Gradient
5 {
6 GradientStops = new List<IGradientStop>
7 {
8 new GradientStop { StopColor = Color.Red, StopPosition = 0 },
9 new GradientStop { StopColor = Color.Blue, StopPosition = 100 }
10 },
11 LinearShade = new LinearShade { Angle = 90 }
12 },
13 Width = new DocumentUnit(3, Units.pt)
14};
15
csharp
1// 4. Attach to a shape
2var shape = new Shape { Type = ShapeType.Rectangle };
3shape.OutLine = new OutLine
4{
5 SolidFill = Color.DarkBlue,
6 Width = new DocumentUnit(1.5, Units.pt),
7 Jointype = StrokeJoinStyleValues.Round,
8 Aligment = PenAlignmentValues.Center
9};
10

Properties

Gets or sets the pen alignment along the path.

Gets or sets the shape of line ends and dashes.

CompoundTypeCompoundLineValues

Gets or sets the compound line style.

Gets or sets the dash pattern of the outline.

GradientFillGradient

Gets or sets the gradient fill of the outline.

Gets or sets the join style used at line corners.

SolidFillColor

Gets or sets the solid fill color of the outline.

Gets or sets the line width.

VegaRiseVDocs.NET

Create Account

Create your VDocs account.

or

Already have an account? Sign in