Skip to main content

rect_with_url

Function rect_with_url 

pub fn rect_with_url(
    canvas: &Canvas,
    rect: impl AsRef<Rect>,
    data: &RCHandle<SkData>,
)
Expand description

Annotates the canvas by associating the specified URL with the specified rectangle (in local coordinates, just like drawRect).

The URL is expected to be escaped and be valid 7-bit ASCII.

If the backend of this canvas does not support annotations, this call is safely ignored.

  • canvas canvas to annotate
  • rect rectangle to associate with the URL
  • data URL data