| 554 | } |
| 555 | |
| 556 | @NotNull @Contract("_, _, _, _, _ -> this") |
| 557 | public Canvas drawString(@NotNull String s, float x, float y, Font font, @NotNull Paint paint) { |
| 558 | assert _ptr != 0 : "Canvas is closed"; |
| 559 | assert s != null : "Can’t drawString with s == null"; |
| 560 | assert paint != null : "Can’t drawString with paint == null"; |
| 561 | Stats.onNativeCall(); |
| 562 | _nDrawString(_ptr, s, x, y, Native.getPtr(font), Native.getPtr(paint)); |
| 563 | ReferenceUtil.reachabilityFence(font); |
| 564 | ReferenceUtil.reachabilityFence(paint); |
| 565 | return this; |
| 566 | } |
| 567 | |
| 568 | @NotNull @Contract("_, _, _, _ -> this") |
| 569 | public Canvas drawTextBlob(@NotNull TextBlob blob, float x, float y, @NotNull Paint paint) { |