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

Method makeSpotLitDiffuse

shared/java/ImageFilter.java:937–945  ·  view source on GitHub ↗

Create a filter that calculates the diffuse illumination from a spot light source, using alpha channel of the input as the height profile of the surface (to approximate normal vectors). The spot light is restricted to be within 'cutoffAngle' of the vector between the location and target. @param x0

(float x0, float y0, float z0, float x1, float y1, float z1, float falloffExponent, float cutoffAngle, int lightColor, float surfaceScale, float kd, @Nullable ImageFilter input, @Nullable Rect crop)

Source from the content-addressed store, hash-verified

935 * @return filter that applies spot diffuse lighting
936 */
937 @NotNull @Contract("_, _, _, _, _, _, _, _, _, _, _, _, _ -> new")
938 public static ImageFilter makeSpotLitDiffuse(float x0, float y0, float z0, float x1, float y1, float z1, float falloffExponent, float cutoffAngle, int lightColor, float surfaceScale, float kd, @Nullable ImageFilter input, @Nullable Rect crop) {
939 try {
940 Stats.onNativeCall();
941 return new ImageFilter(_nMakeSpotLitDiffuse(x0, y0, z0, x1, y1, z1, falloffExponent, cutoffAngle, lightColor, surfaceScale, kd, Native.getPtr(input), crop));
942 } finally {
943 ReferenceUtil.reachabilityFence(input);
944 }
945 }
946
947 @NotNull @Contract("_, _, _, _, _, _, _, _, _, _, _, _, _ -> new")
948 public static ImageFilter makeSpotLitDiffuse(float x0, float y0, float z0, float x1, float y1, float z1, float falloffExponent, float cutoffAngle, int lightColor, float surfaceScale, float kd, @Nullable ImageFilter input, @Nullable IRect crop) {

Callers 1

drawLightsMethod · 0.95

Calls 4

onNativeCallMethod · 0.95
_nMakeSpotLitDiffuseMethod · 0.95
getPtrMethod · 0.95
reachabilityFenceMethod · 0.95

Tested by

no test coverage detected