Draws path and closes it immediately
(@NotNull Path path, @NotNull Paint paint)
| 466 | * Draws path and closes it immediately |
| 467 | */ |
| 468 | @NotNull @Contract("_, _, _ -> this") |
| 469 | public Canvas drawPathOnce(@NotNull Path path, @NotNull Paint paint) { |
| 470 | assert _ptr != 0 : "Canvas is closed"; |
| 471 | assert path != null : "Can’t drawPath with path == null"; |
| 472 | assert paint != null : "Can’t drawPath with paint == null"; |
| 473 | path.setVolatile(true); |
| 474 | Stats.onNativeCall(); |
| 475 | _nDrawPath(_ptr, Native.getPtr(path), Native.getPtr(paint)); |
| 476 | ReferenceUtil.reachabilityFence(paint); |
| 477 | path.close(); |
| 478 | return this; |
| 479 | } |
| 480 | |
| 481 | @NotNull @Contract("_, _, _ -> this") |
| 482 | public Canvas drawImage(@NotNull Image image, float left, float top) { |
no test coverage detected