Flutter Engine
The Flutter Engine
SkAnnotation.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
11#include "include/core/SkRect.h"
13
15 return "SkAnnotationKey_URL";
16}
17
19 return "SkAnnotationKey_Define_Named_Dest";
20}
21
23 return "SkAnnotationKey_Link_Named_Dest";
24}
25
26//////////////////////////////////////////////////////////////////////////////////////////////////
27
29 if (nullptr == value) {
30 return;
31 }
33}
34
35void SkAnnotateNamedDestination(SkCanvas* canvas, const SkPoint& point, SkData* name) {
36 if (nullptr == name) {
37 return;
38 }
39 const SkRect rect = SkRect::MakeXYWH(point.x(), point.y(), 0, 0);
41}
42
44 if (nullptr == name) {
45 return;
46 }
48}
void SkAnnotateNamedDestination(SkCanvas *canvas, const SkPoint &point, SkData *name)
void SkAnnotateLinkToDestination(SkCanvas *canvas, const SkRect &rect, SkData *name)
void SkAnnotateRectWithURL(SkCanvas *canvas, const SkRect &rect, SkData *value)
static const char * Define_Named_Dest_Key()
static const char * Link_Named_Dest_Key()
static const char * URL_Key()
void drawAnnotation(const SkRect &rect, const char key[], SkData *value)
Definition: SkCanvas.cpp:1824
Definition: SkData.h:25
uint8_t value
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
constexpr float y() const
Definition: SkPoint_impl.h:187
constexpr float x() const
Definition: SkPoint_impl.h:181
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
Definition: SkRect.h:659