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

Method annotateRectWithURL

shared/java/Canvas.java:1055–1063  ·  view source on GitHub ↗

For SVG and PDF backends, makes a link over the rectangle to the specified URL. Does nothing on other backends. The URL should be properly escaped and be valid 7-bit ASCII.

(@NotNull Rect r, @NotNull String url)

Source from the content-addressed store, hash-verified

1053 * <p>The URL should be properly escaped and be valid 7-bit ASCII.</p>
1054 */
1055 @NotNull @Contract("_, _ -> this")
1056 public Canvas annotateRectWithURL(@NotNull Rect r, @NotNull String url) {
1057 assert _ptr != 0 : "Canvas is closed";
1058 assert r != null : "Can’t annotateRectWithURL with r == null";
1059 assert url != null : "Can’t annotateRectWithURL with url == null";
1060 Stats.onNativeCall();
1061 _nAnnotateRectWithURL(_ptr, r._left, r._top, r._right, r._bottom, url);
1062 return this;
1063 }
1064
1065 /**
1066 * <p>For the PDF backend, associates the point with a name that {@link Canvas#annotateLinkToDestination} can make a jump to.</p>

Callers 1

executeMethod · 0.80

Calls 2

onNativeCallMethod · 0.95
_nAnnotateRectWithURLMethod · 0.95

Tested by 1

executeMethod · 0.64