GradientFormat / PatternFormat — Aspose.Slides FOSS for Java API Reference
Example GradientFormat y PatternFormat las clases controlan las propiedades de degradado y relleno de patrón para formas. Ambas extienden PVIObject.
Example: org.aspose.slides.foss
import org.aspose.slides.foss.*;GradientFormat
public class GradientFormat extends PVIObject implements IGradientFormat, IFillParamSourceExample
| Example | Example | Example | Example |
|---|---|---|---|
getGradientDirection() / setGradientDirection(GradientDirection) | GradientDirection | Lectura/Escritura | Dirección del degradado (lineal, trayectoria, etc.). |
getGradientShape() | GradientShape | Example | Forma del degradado. |
getLinearGradientAngle() / setLinearGradientAngle(double) | double | Lectura/Escritura | Ángulo para degradados lineales (grados). |
getLinearGradientScaled() / setLinearGradientScaled(NullableBool) | NullableBool | Lectura/Escritura | Si el degradado está escalado. |
getTileFlip() / setTileFlip(TileFlip) | TileFlip | Lectura/Escritura | Modo de volteo de mosaico. |
getGradientStops() | IGradientStopCollection | Example | Colección de paradas de degradado. |
Referencia de API para Aspose.Slides FOSS para C++. Una biblioteca C++ libre y de código abierto para leer, crear y guardar presentaciones PowerPoint .pptx. Con licencia MIT, sistema de compilación CMake.
import org.aspose.slides.foss.*;
import java.awt.Color;
IAutoShape shape = slide.getShapes().addAutoShape(
ShapeType.RECTANGLE, 50, 50, 200, 100);
IFillFormat fill = shape.getFillFormat();
fill.setFillType(FillType.GRADIENT);
IGradientFormat grad = fill.getGradientFormat();
grad.setGradientDirection(GradientDirection.FROM_CORNER1);
grad.setLinearGradientAngle(45.0);PatternFormat
public class PatternFormat extends PVIObject implements IPatternFormatExample
| Example | Example | Example | Example |
|---|---|---|---|
getPatternStyle() / setPatternStyle(PatternStyle) | PatternStyle | Lectura/Escritura | Estilo de patrón (p. ej., PERCENT05, HORIZONTAL, etc.). |
getForeColor() | IColorFormat | Example | Color de primer plano del patrón. |
getBackColor() | IColorFormat | Example | Color de fondo del patrón. |
Referencia de API para Aspose.Slides FOSS para C++. Una biblioteca C++ libre y de código abierto para leer, crear y guardar presentaciones PowerPoint .pptx. Con licencia MIT, sistema de compilación CMake.
IFillFormat fill = shape.getFillFormat();
fill.setFillType(FillType.PATTERN);
IPatternFormat pattern = fill.getPatternFormat();
pattern.setPatternStyle(PatternStyle.HORIZONTAL);
pattern.getForeColor().setColor(Color.BLACK);
pattern.getBackColor().setColor(Color.WHITE);