1cb93a386Sopenharmony_ci/*
2cb93a386Sopenharmony_ci * Copyright 2012 Google Inc.
3cb93a386Sopenharmony_ci *
4cb93a386Sopenharmony_ci * Use of this source code is governed by a BSD-style license that can be
5cb93a386Sopenharmony_ci * found in the LICENSE file.
6cb93a386Sopenharmony_ci */
7cb93a386Sopenharmony_ci
8cb93a386Sopenharmony_ci#ifndef SkAnnotation_DEFINED
9cb93a386Sopenharmony_ci#define SkAnnotation_DEFINED
10cb93a386Sopenharmony_ci
11cb93a386Sopenharmony_ci#include "include/core/SkTypes.h"
12cb93a386Sopenharmony_ci
13cb93a386Sopenharmony_ciclass SkData;
14cb93a386Sopenharmony_cistruct SkPoint;
15cb93a386Sopenharmony_cistruct SkRect;
16cb93a386Sopenharmony_ciclass SkCanvas;
17cb93a386Sopenharmony_ci
18cb93a386Sopenharmony_ci/**
19cb93a386Sopenharmony_ci *  Annotate the canvas by associating the specified URL with the
20cb93a386Sopenharmony_ci *  specified rectangle (in local coordinates, just like drawRect).
21cb93a386Sopenharmony_ci *
22cb93a386Sopenharmony_ci *  If the backend of this canvas does not support annotations, this call is
23cb93a386Sopenharmony_ci *  safely ignored.
24cb93a386Sopenharmony_ci *
25cb93a386Sopenharmony_ci *  The caller is responsible for managing its ownership of the SkData.
26cb93a386Sopenharmony_ci */
27cb93a386Sopenharmony_ciSK_API void SkAnnotateRectWithURL(SkCanvas*, const SkRect&, SkData*);
28cb93a386Sopenharmony_ci
29cb93a386Sopenharmony_ci/**
30cb93a386Sopenharmony_ci *  Annotate the canvas by associating a name with the specified point.
31cb93a386Sopenharmony_ci *
32cb93a386Sopenharmony_ci *  If the backend of this canvas does not support annotations, this call is
33cb93a386Sopenharmony_ci *  safely ignored.
34cb93a386Sopenharmony_ci *
35cb93a386Sopenharmony_ci *  The caller is responsible for managing its ownership of the SkData.
36cb93a386Sopenharmony_ci */
37cb93a386Sopenharmony_ciSK_API void SkAnnotateNamedDestination(SkCanvas*, const SkPoint&, SkData*);
38cb93a386Sopenharmony_ci
39cb93a386Sopenharmony_ci/**
40cb93a386Sopenharmony_ci *  Annotate the canvas by making the specified rectangle link to a named
41cb93a386Sopenharmony_ci *  destination.
42cb93a386Sopenharmony_ci *
43cb93a386Sopenharmony_ci *  If the backend of this canvas does not support annotations, this call is
44cb93a386Sopenharmony_ci *  safely ignored.
45cb93a386Sopenharmony_ci *
46cb93a386Sopenharmony_ci *  The caller is responsible for managing its ownership of the SkData.
47cb93a386Sopenharmony_ci */
48cb93a386Sopenharmony_ciSK_API void SkAnnotateLinkToDestination(SkCanvas*, const SkRect&, SkData*);
49cb93a386Sopenharmony_ci
50cb93a386Sopenharmony_ci#endif
51