类 OpacityFilter

  • 所有已实现的接口:
    java.awt.image.BufferedImageOp, java.lang.Cloneable

    public class OpacityFilter
    extends PointFilter
    Sets the opacity (alpha) of every pixel in an image to a constant value.
    • 构造器详细资料

      • OpacityFilter

        public OpacityFilter()
        Construct an OpacityFilter with 50% opacity.
      • OpacityFilter

        public OpacityFilter​(int opacity)
        Construct an OpacityFilter with the given opacity (alpha).
        参数:
        opacity - the opacity (alpha) in the range 0..255
    • 方法详细资料

      • setOpacity

        public void setOpacity​(int opacity)
        Set the opacity.
        参数:
        opacity - the opacity (alpha) in the range 0..255
        另请参阅:
        getOpacity()
      • getOpacity

        public int getOpacity()
        Get the opacity setting.
        返回:
        the opacity
        另请参阅:
        setOpacity(int)
      • filterRGB

        public int filterRGB​(int x,
                             int y,
                             int rgb)
        指定者:
        filterRGB 在类中 PointFilter
      • toString

        public java.lang.String toString()
        覆盖:
        toString 在类中 java.lang.Object