Class LineFormat
Contents
[
Hide
]LineFormat class
Represents all setting of the line.
public class LineFormat : FillFormat
Properties
| Name | Description |
|---|---|
| BeginArrowheadLength { get; set; } | Gets and sets the begin arrow length type of the line. |
| BeginArrowheadStyle { get; set; } | Gets and sets the begin arrow type of the line. |
| BeginArrowheadWidth { get; set; } | Gets and sets the begin arrow width type of the line. |
| CapType { get; set; } | Specifies the ending caps. |
| CompoundType { get; set; } | Specifies the line compound type. |
| DashStyle { get; set; } | Specifies the line dash type. |
| EndArrowheadLength { get; set; } | Gets and sets the end arrow length type of the line. |
| EndArrowheadStyle { get; set; } | Gets and sets the end arrow type of the line. |
| EndArrowheadWidth { get; set; } | Gets and sets the end arrow width type of the line. |
| FillType { get; set; } | Gets and sets fill type(Inherited from FillFormat.) |
| GradientColor1 { get; } | Returns the gradient color 1 for the specified fill.(Inherited from FillFormat.) |
| GradientColor2 { get; } | Returns the gradient color 2 for the specified fill.(Inherited from FillFormat.) |
| GradientColorType { get; } | Returns the gradient color type for the specified fill.(Inherited from FillFormat.) |
| GradientDegree { get; } | Returns the gradient degree for the specified fill. Only applies for Excel 2007.(Inherited from FillFormat.) |
| GradientFill { get; } | Gets GradientFill object.(Inherited from FillFormat.) |
| GradientStyle { get; } | Returns the gradient style for the specified fill.(Inherited from FillFormat.) |
| GradientVariant { get; } | Returns the gradient variant for the specified fill. Only applies for Excel 2007.(Inherited from FillFormat.) |
| ImageData { get; set; } | Gets and sets the picture image data.(Inherited from FillFormat.) |
| JoinType { get; set; } | Specifies the line join type. |
| Pattern { get; set; } | Represents an area’s display pattern.(Inherited from FillFormat.) |
| PatternFill { get; } | Gets PatternFill object.(Inherited from FillFormat.) |
| PictureFormatType { get; set; } | Gets and sets the picture format type.(Inherited from FillFormat.) |
| PresetColor { get; } | Returns the gradient preset color for the specified fill.(Inherited from FillFormat.) |
| Scale { get; set; } | Gets and sets the picture format scale.(Inherited from FillFormat.) |
| SetType { get; set; } | (Obsolete.) Gets the fill format set type.(Inherited from FillFormat.) |
| SolidFill { get; } | Gets SolidFill object.(Inherited from FillFormat.) |
| Texture { get; set; } | Represents the texture type for the specified fill.(Inherited from FillFormat.) |
| TextureFill { get; } | Gets TextureFill object.(Inherited from FillFormat.) |
| Transparency { get; set; } | Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).(Inherited from FillFormat.) |
| Type { get; set; } | (Obsolete.) Gets and sets the fill type.(Inherited from FillFormat.) |
| Weight { get; set; } | Gets or sets the weight of the line in unit of points. |
Methods
| Name | Description |
|---|---|
| override Equals(object) | Determines whether this instance has the same value as another specified LineFormat object. |
| override GetHashCode() | Gets the hash code. |
| SetOneColorGradient(Color, double, GradientStyleType, int) | Sets the specified fill to a one-color gradient. Only applies for Excel 2007.(Inherited from FillFormat.) |
| SetPresetColorGradient(GradientPresetType, GradientStyleType, int) | Sets the specified fill to a preset-color gradient. Only applies for Excel 2007.(Inherited from FillFormat.) |
| SetTwoColorGradient(Color, Color, GradientStyleType, int) | Sets the specified fill to a two-color gradient. Only applies for Excel 2007.(Inherited from FillFormat.) |
| SetTwoColorGradient(Color, double, Color, double, GradientStyleType, int) | Sets the specified fill to a two-color gradient. Only applies for Excel 2007.(Inherited from FillFormat.) |
Examples
namespace AsposeCellsExamples
{
using Aspose.Cells;
using Aspose.Cells.Drawing;
using System;
using System.Drawing;
public class LineFormatDemo
{
public static void LineFormatExample()
{
// Instantiate a new Workbook
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
ShapeCollection shapes = worksheet.Shapes;
// Add a rectangle shape to the worksheet
Shape shape = shapes.AddRectangle(1, 0, 1, 0, 50, 100);
LineFormat lineFmt = shape.Line;
// Set various properties of the LineFormat
lineFmt.CompoundType = MsoLineStyle.Single;
lineFmt.DashStyle = MsoLineDashStyle.Solid;
lineFmt.CapType = LineCapType.Flat;
lineFmt.JoinType = LineJoinType.Round;
lineFmt.BeginArrowheadStyle = MsoArrowheadStyle.ArrowOpen;
lineFmt.BeginArrowheadWidth = MsoArrowheadWidth.Medium;
lineFmt.BeginArrowheadLength = MsoArrowheadLength.Long;
lineFmt.EndArrowheadStyle = MsoArrowheadStyle.ArrowOpen;
lineFmt.EndArrowheadWidth = MsoArrowheadWidth.Medium;
lineFmt.EndArrowheadLength = MsoArrowheadLength.Long;
lineFmt.Weight = 2.0d;
// Set fill properties
lineFmt.FillType = FillType.Solid;
lineFmt.Transparency = 0.5;
// Save the workbook
workbook.Save("LineFormatExample.xlsx");
workbook.Save("LineFormatExample.pdf");
}
}
}
See Also
- class FillFormat
- namespace Aspose.Cells.Drawing
- assembly Aspose.Cells