Class FilterConf
Note that this configuration may only have an effect if the component it is applied to is non-opaque, which is to say that it does not have another other styles which would obstruct the rendering of the parent layer.
This class exposes the following properties with their respective purpose and default values:
- Kernel
The convolution kernel to apply to the parent layer using the
ConvolveOp
class. Default value isKernelConf.none()
- Area
The area of the current component to which the filter should be applied to. Default value is
UI.ComponentArea.BODY
, which includes the interior and border area of the component. - Offset
The translation to apply to the filtered parent layer. Default value is
(0.0, 0.0)
, which means no translation. - Scale
The scale to apply to the filtered parent layer. Default value is
(1.0, 1.0)
, which means no scaling is applied to the parent layer. - Blur
The blur radius, which is used to apply a gaussian blur to the parent layer using the
ConvolveOp
class. Default value is0.0
, which means no blur is applied.
-
Method Summary
Modifier and TypeMethodDescriptionarea
(UI.ComponentArea area) Define the component area which should display the filtered parent.blur
(double radius) Supply values greater than 0 to this to apply a gaussian blur to the parent layer.boolean
int
hashCode()
Use this to configure a custom convolution kernel based on a row major matrix represented by a width, height and an array of values whose length is the product of the supplied width and height.
Note that this operation will be applied after the parent layer was translated and scaled and blurred.offset
(double x, double y) Uses the given x and y offset values to translate the parent layer before applying other filtering operations.scale
(double x, double y) Scales the parent layer by the given x and y factors before applying other filtering operations.toString()
-
Method Details
-
kernel
Use this to configure a custom convolution kernel based on a row major matrix represented by a width, height and an array of values whose length is the product of the supplied width and height.
Note that this operation will be applied after the parent layer was translated and scaled and blurred.- Parameters:
size
- TheSize
object representing the width and height of the matrix to be used as the convolution kernel.matrix
- A var args array of double values used to form a row major matrix.- Returns:
- An updated filter configuration containing the desired convolution kernel.
-
area
Define the component area which should display the filtered parent. Everything outside that area will not be affected by the filter. Take a look at theUI.ComponentArea
enum documentation for more information on the available areas.- Parameters:
area
- A constant representing the area of the component to which the filter should be clipped to.- Returns:
- An updated filter configuration with the desired clipping area.
-
offset
Uses the given x and y offset values to translate the parent layer before applying other filtering operations.- Parameters:
x
- The amount to translate the parent layer along the x-axis before filtering.y
- The amount to translate the parent layer along the y-axis before filtering.- Returns:
- An updated filter configuration having the desired translation.
-
scale
Scales the parent layer by the given x and y factors before applying other filtering operations.- Parameters:
x
- The factor to scale the parent layer along the x-axis before filtering.y
- The factor to scale the parent layer along the y-axis before filtering.- Returns:
- An updated filter configuration having the desired scaling.
-
blur
Supply values greater than 0 to this to apply a gaussian blur to the parent layer. Note that this operation will be applied after the parent layer was translated and scaled.- Parameters:
radius
- The radius of the gaussian blur filter to apply to the parent layer.- Returns:
- An updated filter configuration having the desired blur radius.
-
equals
-
hashCode
public int hashCode() -
toString
-