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

Method makeDropShadowOnly

shared/java/ImageFilter.java:353–362  ·  view source on GitHub ↗

Create a filter that renders a drop shadow, in exactly the same manner as makeDropShadow, except that the resulting image does not include the input content. This allows the shadow and input to be composed by a filter DAG in a more flexible manner. @param dx The X offset of the shadow @par

(float dx, float dy, float sigmaX, float sigmaY, @NotNull Color4f color, @Nullable ColorSpace colorSpace, @Nullable ImageFilter input, @Nullable Rect crop)

Source from the content-addressed store, hash-verified

351 * @return filter that renders only the drop shadow
352 */
353 @NotNull @Contract("_, _, _, _, _, _, _, _ -> new")
354 public static ImageFilter makeDropShadowOnly(float dx, float dy, float sigmaX, float sigmaY, @NotNull Color4f color, @Nullable ColorSpace colorSpace, @Nullable ImageFilter input, @Nullable Rect crop) {
355 try {
356 Stats.onNativeCall();
357 return new ImageFilter(_nMakeDropShadowOnlyCS(dx, dy, sigmaX, sigmaY, color.getR(), color.getG(), color.getB(), color.getA(), Native.getPtr(colorSpace), Native.getPtr(input), crop));
358 } finally {
359 ReferenceUtil.reachabilityFence(colorSpace);
360 ReferenceUtil.reachabilityFence(input);
361 }
362 }
363
364 @NotNull @Contract("_, _, _, _, _, _, _, _ -> new")
365 public static ImageFilter makeDropShadowOnly(float dx, float dy, float sigmaX, float sigmaY, @NotNull Color4f color, @Nullable ColorSpace colorSpace, @Nullable ImageFilter input, @Nullable IRect crop) {

Callers 3

drawRectShadowNoclipMethod · 0.95
drawMethod · 0.95
drawShadowsBlursMethod · 0.95

Calls 9

onNativeCallMethod · 0.95
getPtrMethod · 0.95
reachabilityFenceMethod · 0.95
_nMakeDropShadowOnlyMethod · 0.95
getRMethod · 0.45
getGMethod · 0.45
getBMethod · 0.45
getAMethod · 0.45

Tested by

no test coverage detected