Class AbstractTintingFilter

    • Field Detail

      • hFactor

        protected float hFactor
      • sFactor

        protected float sFactor
      • bFactor

        protected float bFactor
    • Constructor Detail

      • AbstractTintingFilter

        public AbstractTintingFilter()
      • AbstractTintingFilter

        public AbstractTintingFilter​(float hFactor,
                                     float sFactor,
                                     float bFactor)
    • Method Detail

      • getHFactor

        public float getHFactor()
        Description copied from interface: TintingFilter
        Returns the hue adjustment factor.
        Specified by:
        getHFactor in interface TintingFilter
        Returns:
        hue factor
      • getSFactor

        public float getSFactor()
        Description copied from interface: TintingFilter
        Returns the saturation adjustment factor.
        Specified by:
        getSFactor in interface TintingFilter
        Returns:
        saturation factor
      • getBFactor

        public float getBFactor()
        Description copied from interface: TintingFilter
        Returns the brightness adjustment factor.
        Specified by:
        getBFactor in interface TintingFilter
        Returns:
        brightness factor
      • setHFactor

        public void setHFactor​(float hFactor)
      • setSFactor

        public void setSFactor​(float sFactor)
      • setBFactor

        public void setBFactor​(float bFactor)
      • setFactors

        public void setFactors​(float h,
                               float s,
                               float b)
        Sets the hue, saturation, and brightness factors to use for tinting.

        Implementation Note: if saturation or brightness are less than 0, they are clamped to 0. Values over 1 are not clamped. If your subclass requires that saturation or brightness are clamped at 1, override this method to do so, then call the super implementation.

        Specified by:
        setFactors in interface TintingFilter
        Parameters:
        h - the hue factor
        s - the saturation factor
        b - the brightness factor
      • isIdentity

        public boolean isIdentity()
        Description copied from interface: TintingFilter
        Returns true if applying this filter would have no effect. This can be used as an optimization hint.
        Specified by:
        isIdentity in interface TintingFilter
        Returns:
        true if a filtered image would not change