Create a filter that draws the 'src' portion of image into 'dst' using the given filter quality. The returned image filter evaluates to transparent black if 'image' is null. @param image The image that is output by the filter, subset by 'src' @param src The source pixels sampled into 'dst' @p
(@Nullable Image image, @NotNull Rect src, @NotNull Rect dst, @NotNull SamplingMode mode)
| 427 | * @return filter that draws the image |
| 428 | */ |
| 429 | @NotNull @Contract("_, _, _, _ -> new") |
| 430 | public static ImageFilter makeImage(@Nullable Image image, @NotNull Rect src, @NotNull Rect dst, @NotNull SamplingMode mode) { |
| 431 | try { |
| 432 | Stats.onNativeCall(); |
| 433 | return new ImageFilter(_nMakeImage(Native.getPtr(image), src._left, src._top, src._right, src._bottom, dst._left, dst._top, dst._right, dst._bottom, mode._pack())); |
| 434 | } finally { |
| 435 | ReferenceUtil.reachabilityFence(image); |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | /** |
| 440 | * Create a filter that draws the image using the given sampling. |
no test coverage detected