LineFormat controls the appearance of a shape’s border or an explicit line / connector stroke. Access it via shape.line_format or through cell-border properties such as cell_format.border_left.
Package: aspose.slides_foss
LineFormat
Properties
Basic stroke
| Property | Type | Access | Description |
|---|
fill_format | LineFillFormat | Read | Fill of the line (colour, gradient). Usually set via fill_format.fill_type = FillType.SOLID and fill_format.solid_fill_color.color = .... |
width | float | Read/Write | Line width in points. Default is 0.75. |
is_format_not_defined | bool | Read | True if no <a:ln> element exists and the line is using inherited defaults. |
Dash and cap
| Property | Type | Description |
|---|
dash_style | LineDashStyle | Preset dash pattern: SOLID, DOT, DASH, LARGE_DASH, DASH_DOT, LARGE_DASH_DOT, LARGE_DASH_DOT_DOT, SYSTEM_DASH, SYSTEM_DOT, SYSTEM_DASH_DOT, SYSTEM_DASH_DOT_DOT, CUSTOM, NOT_DEFINED. |
custom_dash_pattern | list[float] | Read/Write |
cap_style | LineCapStyle | Cap style applied to line ends: ROUND, SQUARE, FLAT, NOT_DEFINED. |
Compound style and alignment
| Property | Type | Description |
|---|
style | LineStyle | Compound line style: SINGLE, THIN_THIN, THICK_THIN, THIN_THICK, THICK_BETWEEN_THIN, NOT_DEFINED. |
alignment | LineAlignment | Alignment relative to the shape border: CENTER, INSET, NOT_DEFINED. |
Join style
| Property | Type | Description |
|---|
join_style | LineJoinStyle | Corner join style: ROUND, BEVEL, MITER, NOT_DEFINED. |
miter_limit | float | Miter limit ratio. Only meaningful when join_style = MITER. |
Arrowheads (begin)
| Property | Type | Description |
|---|
begin_arrowhead_style | LineArrowheadStyle | Arrow type at the start: NONE, TRIANGLE, STEALTH, DIAMOND, OVAL, OPEN, NOT_DEFINED. |
begin_arrowhead_width | LineArrowheadWidth | Arrow width: NARROW, MEDIUM, WIDE, NOT_DEFINED. |
begin_arrowhead_length | LineArrowheadLength | Arrow length: SHORT, MEDIUM, LONG, NOT_DEFINED. |
Arrowheads (end)
| Property | Type | Description |
|---|
end_arrowhead_style | LineArrowheadStyle | Same values as begin_arrowhead_style. |
end_arrowhead_width | LineArrowheadWidth | Same values as begin_arrowhead_width. |
end_arrowhead_length | LineArrowheadLength | Same values as begin_arrowhead_length. |
LineFillFormat
Access via line_format.fill_format. Controls the colour and texture of the line stroke.
| Property | Type | Description |
|---|
fill_type | FillType | NO_FILL, SOLID, GRADIENT, PATTERN. |
solid_fill_color | ColorFormat | Solid colour when fill_type = SOLID. |
gradient_fill_format | GradientFillFormat | Gradient settings when fill_type = GRADIENT. |
pattern_fill_format | PatternFillFormat | Pattern settings when fill_type = PATTERN. |
Usage Example
Dashed red border with round caps and an arrow
Arrow connector
See Also