MCPcopy Create free account
hub / github.com/HumbleUI/Skija / makeDistantLitDiffuse

Method makeDistantLitDiffuse

shared/java/ImageFilter.java:863–871  ·  view source on GitHub ↗

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). @param x The direction to the distance light (X component) @param y The dir

(float x, float y, float z, int lightColor, float surfaceScale, float kd, @Nullable ImageFilter input, @Nullable Rect crop)

Source from the content-addressed store, hash-verified

861 * @return filter that applies distant diffuse lighting
862 */
863 @NotNull @Contract("_, _, _, _, _, _, _, _ -> new")
864 public static ImageFilter makeDistantLitDiffuse(float x, float y, float z, int lightColor, float surfaceScale, float kd, @Nullable ImageFilter input, @Nullable Rect crop) {
865 try {
866 Stats.onNativeCall();
867 return new ImageFilter(_nMakeDistantLitDiffuse(x, y, z, lightColor, surfaceScale, kd, Native.getPtr(input), crop));
868 } finally {
869 ReferenceUtil.reachabilityFence(input);
870 }
871 }
872
873 @NotNull @Contract("_, _, _, _, _, _, _, _ -> new")
874 public static ImageFilter makeDistantLitDiffuse(float x, float y, float z, int lightColor, float surfaceScale, float kd, @Nullable ImageFilter input, @Nullable IRect crop) {

Callers 1

drawLightsMethod · 0.95

Calls 4

onNativeCallMethod · 0.95
getPtrMethod · 0.95
reachabilityFenceMethod · 0.95

Tested by

no test coverage detected