org.apache.poi.xslf.usermodel

## Class XSLFTexturePaint

- java.lang.Object
- - org.apache.poi.xslf.usermodel.XSLFTexturePaint

- All Implemented Interfaces:
    PaintStyle, PaintStyle.TexturePaint

      @Internal
      public class XSLFTexturePaint
      extends java.lang.Object
      implements PaintStyle.TexturePaint

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.poi.sl.usermodel.PaintStyle

      `PaintStyle.FlipMode, PaintStyle.GradientPaint, PaintStyle.PaintModifier, PaintStyle.SolidPaint, PaintStyle.TextureAlignment, PaintStyle.TexturePaint`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XSLFTexturePaint(org.openxmlformats.schemas.drawingml.x2006.main.CTBlipFillProperties blipFill, PackagePart parentPart, org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor phClr, XSLFTheme theme, XSLFSheet sheet)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PaintStyle.TextureAlignment` | `getAlignment()`
    `int` | `getAlpha()`
    `java.lang.String` | `getContentType()`
    `java.util.List<ColorStyle>` | `getDuoTone()` For pattern images, the duo tone defines the black/white pixel color replacement
    `PaintStyle.FlipMode` | `getFlipMode()`
    `java.io.InputStream` | `getImageData()`
    `Insets2D` | `getInsets()` Specifies the portion of the blip or image that is used for the fill.
    `java.awt.geom.Point2D` | `getOffset()`
    `java.awt.geom.Dimension2D` | `getScale()`
    `Insets2D` | `getStretch()` The stretch specifies the edges of a fill rectangle.
    `boolean` | `isRotatedWithShape()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XSLFTexturePaint

          public XSLFTexturePaint(org.openxmlformats.schemas.drawingml.x2006.main.CTBlipFillProperties blipFill,
                                  PackagePart parentPart,
                                  org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor phClr,
                                  XSLFTheme theme,
                                  XSLFSheet sheet)

  - ### Method Detail

    - #### getImageData

          public java.io.InputStream getImageData()

      Specified by:
        `getImageData` in interface `PaintStyle.TexturePaint`
      Returns:
        the raw image stream

    - #### getContentType

          public java.lang.String getContentType()

      Specified by:
        `getContentType` in interface `PaintStyle.TexturePaint`
      Returns:
        the content type of the image data

    - #### getAlpha

          public int getAlpha()

      Specified by:
        `getAlpha` in interface `PaintStyle.TexturePaint`
      Returns:
        the alpha mask in percents [0..100000]

    - #### isRotatedWithShape

          public boolean isRotatedWithShape()

      Specified by:
        `isRotatedWithShape` in interface `PaintStyle.TexturePaint`
      Returns:
        `true`, if the rotation of the shape is also applied to the texture paint

    - #### getScale

          public java.awt.geom.Dimension2D getScale()

      Specified by:
        `getScale` in interface `PaintStyle.TexturePaint`
      Returns:
        the dimensions of the tiles in percent of the shape dimensions or `null` if no scaling is applied

    - #### getOffset

          public java.awt.geom.Point2D getOffset()

      Specified by:
        `getOffset` in interface `PaintStyle.TexturePaint`
      Returns:
        the offset of the tiles in points or `null` if there's no offset

    - #### getFlipMode

          public PaintStyle.FlipMode getFlipMode()

      Specified by:
        `getFlipMode` in interface `PaintStyle.TexturePaint`
      Returns:
        the flip/mirroring/duplication mode

    - #### getAlignment

          public PaintStyle.TextureAlignment getAlignment()

      Specified by:
        `getAlignment` in interface `PaintStyle.TexturePaint`

    - #### getInsets

          public Insets2D getInsets()

      Description copied from interface: `PaintStyle.TexturePaint`
      Specifies the portion of the blip or image that is used for the fill.

      Each edge of the image is defined by a percentage offset from the edge of the bounding box. A positive percentage specifies an inset and a negative percentage specifies an outset.

      The percentage are ints based on 100000, so 100% = 100000.

      So, for example, a left offset of 25% specifies that the left edge of the image is located to the right of the bounding box's left edge by 25% of the bounding box's width.

      Specified by:
        `getInsets` in interface `PaintStyle.TexturePaint`
      Returns:
        the cropping insets of the source image

    - #### getStretch

          public Insets2D getStretch()

      Description copied from interface: `PaintStyle.TexturePaint`
      The stretch specifies the edges of a fill rectangle.

      Each edge of the fill rectangle is defined by a perentage offset from the corresponding edge of the picture's bounding box. A positive percentage specifies an inset and a negative percentage specifies an outset.

      The percentage are ints based on 100000, so 100% = 100000.

      Specified by:
        `getStretch` in interface `PaintStyle.TexturePaint`
      Returns:
        the stretching in the destination image

    - #### getDuoTone

          public java.util.List<ColorStyle> getDuoTone()

      Description copied from interface: `PaintStyle.TexturePaint`
      For pattern images, the duo tone defines the black/white pixel color replacement
      Specified by:
        `getDuoTone` in interface `PaintStyle.TexturePaint`

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.