GradientFormat / PatternFormat

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, IFillParamSource

Example

ExampleExampleExampleExample
getGradientDirection() / setGradientDirection(GradientDirection)GradientDirectionLectura/EscrituraDirección del degradado (lineal, trayectoria, etc.).
getGradientShape()GradientShapeExampleForma del degradado.
getLinearGradientAngle() / setLinearGradientAngle(double)doubleLectura/EscrituraÁngulo para degradados lineales (grados).
getLinearGradientScaled() / setLinearGradientScaled(NullableBool)NullableBoolLectura/EscrituraSi el degradado está escalado.
getTileFlip() / setTileFlip(TileFlip)TileFlipLectura/EscrituraModo de volteo de mosaico.
getGradientStops()IGradientStopCollectionExampleColecció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 IPatternFormat

Example

ExampleExampleExampleExample
getPatternStyle() / setPatternStyle(PatternStyle)PatternStyleLectura/EscrituraEstilo de patrón (p. ej., PERCENT05, HORIZONTAL, etc.).
getForeColor()IColorFormatExampleColor de primer plano del patrón.
getBackColor()IColorFormatExampleColor 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);

Ver también

 Español