Class ImageWrapperDecorationPainter

    • Field Detail

      • originalTile

        protected Image originalTile
        Contains the original (not colorized) image of this painter.
      • baseDecorationPainter

        protected SubstanceDecorationPainter baseDecorationPainter
        The base decoration painter - the colorized image tiles are painted over the painting of this painter. Can be null.
      • textureAlpha

        protected float textureAlpha
        Alpha channel for the texture image (colorized tiles applied on top of the baseDecorationPainter painting).
    • Constructor Detail

      • ImageWrapperDecorationPainter

        public ImageWrapperDecorationPainter()
        Creates a new image wrapper decoration painter.
    • Method Detail

      • tileArea

        protected void tileArea​(Graphics2D g,
                                Component comp,
                                SubstanceColorScheme tileScheme,
                                int offsetTextureX,
                                int offsetTextureY,
                                int x,
                                int y,
                                int width,
                                int height)
        Tiles the specified area with colorized version of the image tile. This is called after the baseDecorationPainter has painted the area. This method should respect the current textureAlpha value.
        Parameters:
        g - Graphic context.
        comp - Component.
        tileScheme - Scheme for the tile colorization.
        offsetTextureX - X offset for the tiling.
        offsetTextureY - Y offset for the tiling.
        x - X coordinate of the tiling region.
        y - Y coordinate of the tiling region.
        width - Width of the tiling region.
        height - Height of the tiling region.
      • setBaseDecorationPainter

        public void setBaseDecorationPainter​(SubstanceDecorationPainter baseDecorationPainter)
        Sets the base decoration painter.
        Parameters:
        baseDecorationPainter - Base decoration painter.
      • setTextureAlpha

        public void setTextureAlpha​(float textureAlpha)
        Sets the alpha channel for the image texture.
        Parameters:
        textureAlpha - Alpha channel for the image texture.
      • getColorizedTile

        protected Image getColorizedTile​(SubstanceColorScheme scheme)
        Returns a colorized image tile.
        Parameters:
        scheme - Color scheme for the colorization.
        Returns:
        Colorized tile.