LineFormat — Aspose.Slides FOSS for Java API Reference

The LineFormat class represents the format of a line (shape outline). It implements ILineFormat.

Package: org.aspose.slides.foss

import org.aspose.slides.foss.*;
public class LineFormat implements ILineFormat

Properties

PropertyTypeAccessDescription
getFillFormat()ILineFillFormatReadFill properties of the line.
getWidth() / setWidth(double)doubleRead/WriteLine width in points.
getDashStyle() / setDashStyle(LineDashStyle)LineDashStyleRead/WriteDash style (solid, dash, dot, etc.).
getCapStyle() / setCapStyle(LineCapStyle)LineCapStyleRead/WriteLine cap style (flat, round, square).
getStyle()LineStyleReadLine style (single, double, etc.).
getCustomDashPattern() / setCustomDashPattern(List<Double>)List<Double>Read/WriteCustom dash pattern values.
isFormatNotDefined()booleanReadWhether no line format is defined.

Usage Examples

Set a Shape Outline

import org.aspose.slides.foss.*;
import java.awt.Color;

IAutoShape shape = slide.getShapes().addAutoShape(
    ShapeType.RECTANGLE, 50, 50, 200, 100);

ILineFormat line = shape.getLineFormat();
line.setWidth(3.0);
line.setDashStyle(LineDashStyle.DASH);
line.getFillFormat().setFillType(FillType.SOLID);
line.getFillFormat().getSolidFillColor().setColor(Color.BLACK);

See Also