com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class FillFormat

    • Method Detail

      • getFillType

        public final byte getFillType()

        Returns or sets the type of filling. Read/write FillType.

        Specified by:
        getFillType in interface IFillFormat
      • setFillType

        public final void setFillType(byte value)

        Returns or sets the type of filling. Read/write FillType.

        Specified by:
        setFillType in interface IFillFormat
      • setRotateWithShape

        public final void setRotateWithShape(byte value)

        Determines whether the fill should be rotated with shape. Read/write NullableBool.

        Specified by:
        setRotateWithShape in interface IFillFormat
      • getEffective

        public final IFillFormatEffectiveData getEffective()

        Gets effective fill formatting data with the inheritance applied.


         This example demonstrates getting shape's effective fill format properties.
         
         Presentation pres = new Presentation("MyPresentation.pptx");
         try
         {
                IFillFormatEffectiveData effectiveFillFormat = pres.getSlides().get_Item(0).getShapes().get_Item(0).getFillFormat().getEffective();
                System.out.println("Type: " + effectiveFillFormat.getFillType());
                switch (effectiveFillFormat.getFillType())
                {
                        case FillType.Solid:
                                System.out.println("Fill color: " + effectiveFillFormat.getSolidFillColor());
                                break;
                        case FillType.Pattern:
                                System.out.println("Pattern style: " + effectiveFillFormat.getPatternFormat().getPatternStyle());
                                System.out.println("Fore color: " + effectiveFillFormat.getPatternFormat().getForeColor());
                                System.out.println("Back color: " + effectiveFillFormat.getPatternFormat().getBackColor());
                                break;
                        case FillType.Gradient:
                                System.out.println("Gradient direction: " + effectiveFillFormat.getGradientFormat().getGradientDirection());
                                System.out.println("Gradient stops count: " + effectiveFillFormat.getGradientFormat().getGradientStops().size());
                                break;
                        case FillType.Picture:
                                System.out.println("Picture width: " + effectiveFillFormat.getPictureFillFormat().getPicture().getImage().getWidth());
                                System.out.println("Picture height: " + effectiveFillFormat.getPictureFillFormat().getPicture().getImage().getHeight());
                                break;
                }
         } finally {
          if (pres != null) pres.dispose();
         }
         

        Specified by:
        getEffective in interface IFillFormat
        Returns:
        A IFillFormatEffectiveData.