|
static ImageFilter | distantLitDiffuse (float x, float y, float z, Color c, float surfaceScale, float kd, @Nullable ImageFilter input) |
|
static ImageFilter | blur (float sigmaX, float sigmaY, TileMode tileMode, float left, float top, float right, float bottom, @Nullable ImageFilter input) |
|
static ImageFilter | dropShadow (float dx, float dy, float sigmaX, float sigmaY, Color c, @Nullable ImageFilter input) |
|
static ImageFilter | blend (BlendMode blendMode, @Nullable ImageFilter background, @Nullable ImageFilter foreground) |
|
static ImageFilter | image (@NonNull Image image) |
|
Definition at line 13 of file ImageFilter.java.
◆ blend()
Definition at line 82 of file ImageFilter.java.
83 {
84 long nativeBackground = 0;
85 long nativeForeground = 0;
86 if (background != null) {
87 nativeBackground = background.getNativeInstance();
88 }
89 if (foreground != null) {
90 nativeForeground = foreground.getNativeInstance();
91 }
92 return new ImageFilter(nBlend(blendMode.nativeInt, nativeBackground, nativeForeground));
93 }
◆ blur()
static ImageFilter org.skia.jetski.ImageFilter.blur |
( |
float |
sigmaX, |
|
|
float |
sigmaY, |
|
|
TileMode |
tileMode, |
|
|
float |
left, |
|
|
float |
top, |
|
|
float |
right, |
|
|
float |
bottom, |
|
|
@Nullable ImageFilter |
input |
|
) |
| |
|
inlinestatic |
Create a filter that calculates the diffuse illumination from a distant light source, interpreting the alpha channel of the input as the height profile of the surface (to approximate normal vectors).
- Parameters
-
sigmaX | The Gaussian sigma value for blurring along the X axis. |
sigmaY | The Gaussian sigma value for blurring along the Y axis. |
tileMode | The tile mode applied at edges |
left | Left, top, right, bottom are used to make the crop rect |
input | The input filter that is blurred, uses source bitmap if this is null. |
Definition at line 51 of file ImageFilter.java.
53 {
54 long nativeInput = 0;
55 if (input != null) {
56 nativeInput = input.getNativeInstance();
57 }
58 return new ImageFilter(nBlur(sigmaX, sigmaY, tileMode.nativeInt,
60 }
static bool left(const SkPoint &p0, const SkPoint &p1)
static bool right(const SkPoint &p0, const SkPoint &p1)
◆ distantLitDiffuse()
static ImageFilter org.skia.jetski.ImageFilter.distantLitDiffuse |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
Color |
c, |
|
|
float |
surfaceScale, |
|
|
float |
kd, |
|
|
@Nullable ImageFilter |
input |
|
) |
| |
|
inlinestatic |
Create a filter that calculates the diffuse illumination from a distant light source, interpreting the alpha channel of the input as the height profile of the surface (to approximate normal vectors).
- Parameters
-
x,y,z | The direction to the distance light. |
c | The color of the diffuse light source. |
surfaceScale | Scale factor to transform from alpha values to physical height. |
kd | Diffuse reflectance coefficient. |
input | The input filter that defines surface normals (as alpha), or uses the source bitmap when null. |
Definition at line 31 of file ImageFilter.java.
32 {
33 long nativeInput = 0;
34 if (input != null) {
35 nativeInput = input.getNativeInstance();
36 }
37 return new ImageFilter(nDistantLitDiffuse(
x,
y, z, c.r(), c.g(), c.b(),
38 surfaceScale, kd, nativeInput));
39 }
◆ dropShadow()
static ImageFilter org.skia.jetski.ImageFilter.dropShadow |
( |
float |
dx, |
|
|
float |
dy, |
|
|
float |
sigmaX, |
|
|
float |
sigmaY, |
|
|
Color |
c, |
|
|
@Nullable ImageFilter |
input |
|
) |
| |
|
inlinestatic |
Create a filter that draws a drop shadow under the input content. This filter produces an image that includes the inputs' content.
- Parameters
-
dx | The X offset of the shadow. |
dy | The Y offset of the shadow. |
sigmaX | The blur radius for the shadow, along the X axis. |
sigmaY | The blur radius for the shadow, along the Y axis. |
c | The color of the drop shadow. |
input | The input filter, or will use the source bitmap if this is null. |
Definition at line 72 of file ImageFilter.java.
74 {
75 long nativeInput = 0;
76 if (input != null) {
77 nativeInput = input.getNativeInstance();
78 }
79 return new ImageFilter(nDropShadow(dx, dy, sigmaX, sigmaY, c.r(), c.g(), c.b(), nativeInput));
80 }
◆ finalize()
void org.skia.jetski.ImageFilter.finalize |
( |
| ) |
throws Throwable |
|
inlineprotected |
◆ getNativeInstance()
long org.skia.jetski.ImageFilter.getNativeInstance |
( |
| ) |
|
|
inlinepackage |
◆ image()
Definition at line 95 of file ImageFilter.java.
95 {
96 return new ImageFilter(nImage(
image.getNativeInstance()));
97 }
◆ release()
void org.skia.jetski.ImageFilter.release |
( |
| ) |
|
|
inline |
Releases any resources associated with this Shader.
Definition at line 102 of file ImageFilter.java.
102 {
103 nRelease(mNativeInstance);
104 mNativeInstance = 0;
105 }
The documentation for this class was generated from the following file:
- third_party/skia/platform_tools/android/apps/jetski/src/main/java/org/skia/jetski/ImageFilter.java