LineFormat — Aspose.Slides FOSS for Java API Reference
Example LineFormat class representa el format d’una línia (contorn de forma). Implementa ILineFormat.
Example: org.aspose.slides.foss
import org.aspose.slides.foss.*;public class LineFormat implements ILineFormatExample
| Example | Example | Example | Example |
|---|---|---|---|
getFillFormat() | ILineFillFormat | Example | Propietats d’emplenament de la línia. |
getWidth() / setWidth(double) | double | Lectura/Escriptura | Amplada de la línia en punts. |
getDashStyle() / setDashStyle(LineDashStyle) | LineDashStyle | Lectura/Escriptura | Estil de guió (sòlid, guió, punt, etc.). |
getCapStyle() / setCapStyle(LineCapStyle) | LineCapStyle | Lectura/Escriptura | Estil de cap de línia (pla, rodó, quadrat). |
getStyle() | LineStyle | Example | Estil de línia (simple, doble, etc.). |
getCustomDashPattern() / setCustomDashPattern(List<Double>) | List<Double> | Lectura/Escriptura | Valors de patró de guió personalitzats. |
isFormatNotDefined() | boolean | Example | Si no s’ha definit cap format de línia. |
Exemples d’ús
Estableix un contorn de forma
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);