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

Method drawString

shared/java/Canvas.java:556–566  ·  view source on GitHub ↗
(@NotNull String s, float x, float y, Font font, @NotNull Paint paint)

Source from the content-addressed store, hash-verified

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) {

Calls 4

onNativeCallMethod · 0.95
_nDrawStringMethod · 0.95
getPtrMethod · 0.95
reachabilityFenceMethod · 0.95

Tested by 1