2012-07-11 19:57:55 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2012 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SkAnnotation_DEFINED
|
|
|
|
#define SkAnnotation_DEFINED
|
|
|
|
|
2019-04-23 17:05:21 +00:00
|
|
|
#include "include/core/SkTypes.h"
|
2012-07-11 19:57:55 +00:00
|
|
|
|
|
|
|
class SkData;
|
2013-03-08 09:09:10 +00:00
|
|
|
struct SkPoint;
|
2012-07-11 19:57:55 +00:00
|
|
|
struct SkRect;
|
|
|
|
class SkCanvas;
|
|
|
|
|
|
|
|
/**
|
2016-03-03 17:14:36 +00:00
|
|
|
* Annotate the canvas by associating the specified URL with the
|
2016-03-05 00:36:20 +00:00
|
|
|
* specified rectangle (in local coordinates, just like drawRect).
|
|
|
|
*
|
|
|
|
* If the backend of this canvas does not support annotations, this call is
|
2012-07-11 19:57:55 +00:00
|
|
|
* safely ignored.
|
|
|
|
*
|
|
|
|
* The caller is responsible for managing its ownership of the SkData.
|
|
|
|
*/
|
|
|
|
SK_API void SkAnnotateRectWithURL(SkCanvas*, const SkRect&, SkData*);
|
|
|
|
|
2013-03-08 09:09:10 +00:00
|
|
|
/**
|
|
|
|
* Annotate the canvas by associating a name with the specified point.
|
|
|
|
*
|
|
|
|
* If the backend of this canvas does not support annotations, this call is
|
|
|
|
* safely ignored.
|
|
|
|
*
|
|
|
|
* The caller is responsible for managing its ownership of the SkData.
|
|
|
|
*/
|
|
|
|
SK_API void SkAnnotateNamedDestination(SkCanvas*, const SkPoint&, SkData*);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Annotate the canvas by making the specified rectangle link to a named
|
|
|
|
* destination.
|
|
|
|
*
|
|
|
|
* If the backend of this canvas does not support annotations, this call is
|
|
|
|
* safely ignored.
|
|
|
|
*
|
|
|
|
* The caller is responsible for managing its ownership of the SkData.
|
|
|
|
*/
|
|
|
|
SK_API void SkAnnotateLinkToDestination(SkCanvas*, const SkRect&, SkData*);
|
|
|
|
|
2012-07-11 19:57:55 +00:00
|
|
|
#endif
|