Package icyllis.modernui.graphics
Class Shader
java.lang.Object
icyllis.modernui.graphics.Shader
- Direct Known Subclasses:
GradientShader
,ImageShader
Shaders specify the source color(s) for what is being drawn. If a paint
has no shader, then the paint's color is used. If the paint has a
shader, then the shader's color(s) are use instead, but they are
modulated by the paint's alpha. This makes it easy to create a shader
once (e.g. image tiling or gradient) and then change its transparency
w/o having to modify the original shader... only the paint's alpha needs
to be modified.
- Since:
- 3.11
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Tile modes, also known as address modes and wrap modes. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
release()
Perform a deferred cleanup if the underlying resource is not released.
-
Constructor Details
-
Shader
public Shader()
-
-
Method Details
-
release
public void release()Perform a deferred cleanup if the underlying resource is not released. Manually mark the underlying resources closed, if needed. After this operation, this shader represents a no-op, and its GPU resource will be reclaimed as soon as possible after use.When this object becomes phantom-reachable, the system will automatically do this cleanup operation.
-