类 ShadowFilter

    • 构造器详细资料

      • ShadowFilter

        public ShadowFilter()
        Construct a ShadowFilter.
      • ShadowFilter

        public ShadowFilter​(float radius,
                            float xOffset,
                            float yOffset,
                            float opacity)
        Construct a ShadowFilter.
        参数:
        radius - the radius of the shadow
        xOffset - the X offset of the shadow
        yOffset - the Y offset of the shadow
        opacity - the opacity of the shadow
    • 方法详细资料

      • setAngle

        public void setAngle​(float angle)
        Specifies the angle of the shadow.
        参数:
        angle - the angle of the shadow.
        另请参阅:
        getAngle()
      • getAngle

        public float getAngle()
        Returns the angle of the shadow.
        返回:
        the angle of the shadow.
        另请参阅:
        setAngle(float)
      • setDistance

        public void setDistance​(float distance)
        Set the distance of the shadow.
        参数:
        distance - the distance.
        另请参阅:
        getDistance()
      • getDistance

        public float getDistance()
        Get the distance of the shadow.
        返回:
        the distance.
        另请参阅:
        setDistance(float)
      • setRadius

        public void setRadius​(float radius)
        Set the radius of the kernel, and hence the amount of blur. The bigger the radius, the longer this filter will take.
        参数:
        radius - the radius of the blur in pixels.
        另请参阅:
        getRadius()
      • getRadius

        public float getRadius()
        Get the radius of the kernel.
        返回:
        the radius
        另请参阅:
        setRadius(float)
      • setOpacity

        public void setOpacity​(float opacity)
        Set the opacity of the shadow.
        参数:
        opacity - the opacity.
        另请参阅:
        getOpacity()
      • getOpacity

        public float getOpacity()
        Get the opacity of the shadow.
        返回:
        the opacity.
        另请参阅:
        setOpacity(float)
      • setShadowColor

        public void setShadowColor​(int shadowColor)
        Set the color of the shadow.
        参数:
        shadowColor - the color.
        另请参阅:
        getShadowColor()
      • getShadowColor

        public int getShadowColor()
        Get the color of the shadow.
        返回:
        the color.
        另请参阅:
        setShadowColor(int)
      • setAddMargins

        public void setAddMargins​(boolean addMargins)
        Set whether to increase the size of the output image to accomodate the shadow.
        参数:
        addMargins - true to add margins.
        另请参阅:
        getAddMargins()
      • getAddMargins

        public boolean getAddMargins()
        Get whether to increase the size of the output image to accomodate the shadow.
        返回:
        true to add margins.
        另请参阅:
        setAddMargins(boolean)
      • setShadowOnly

        public void setShadowOnly​(boolean shadowOnly)
        Set whether to only draw the shadow without the original image.
        参数:
        shadowOnly - true to only draw the shadow.
        另请参阅:
        getShadowOnly()
      • getShadowOnly

        public boolean getShadowOnly()
        Get whether to only draw the shadow without the original image.
        返回:
        true to only draw the shadow.
        另请参阅:
        setShadowOnly(boolean)