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

Method makePointLitDiffuse

shared/java/ImageFilter.java:897–905  ·  view source on GitHub ↗

Create a filter that calculates the diffuse illumination from a point light source, using alpha channel of the input as the height profile of the surface (to approximate normal vectors). @param x The location of the point light (X component) @param y The location of the poin

(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

895 * @return filter that applies point diffuse lighting
896 */
897 @NotNull @Contract("_, _, _, _, _, _, _, _ -> new")
898 public static ImageFilter makePointLitDiffuse(float x, float y, float z, int lightColor, float surfaceScale, float kd, @Nullable ImageFilter input, @Nullable Rect crop) {
899 try {
900 Stats.onNativeCall();
901 return new ImageFilter(_nMakePointLitDiffuse(x, y, z, lightColor, surfaceScale, kd, Native.getPtr(input), crop));
902 } finally {
903 ReferenceUtil.reachabilityFence(input);
904 }
905 }
906
907 @NotNull @Contract("_, _, _, _, _, _, _, _ -> new")
908 public static ImageFilter makePointLitDiffuse(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
_nMakePointLitDiffuseMethod · 0.95
getPtrMethod · 0.95
reachabilityFenceMethod · 0.95

Tested by

no test coverage detected