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)
| 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) { |
no test coverage detected