Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Side by Side Diff: gm/annotated_text.cpp

Issue 1257533004: Merge sub-device annotations in SkPDFDevice::drawDevice() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase and address comment Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/doc/SkDocument_PDF.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkAnnotation.h" 8 #include "SkAnnotation.h"
9 #include "SkData.h" 9 #include "SkData.h"
10 #include "gm.h" 10 #include "gm.h"
(...skipping 16 matching lines...) Expand all
27 DEF_SIMPLE_GM(annotated_text, canvas, 512, 512) { 27 DEF_SIMPLE_GM(annotated_text, canvas, 512, 512) {
28 SkAutoCanvasRestore autoCanvasRestore(canvas, true); 28 SkAutoCanvasRestore autoCanvasRestore(canvas, true);
29 canvas->clear(SK_ColorWHITE); 29 canvas->clear(SK_ColorWHITE);
30 canvas->clipRect(SkRect::MakeXYWH(64, 64, 256, 256)); 30 canvas->clipRect(SkRect::MakeXYWH(64, 64, 256, 256));
31 canvas->clear(0xFFEEEEEE); 31 canvas->clear(0xFFEEEEEE);
32 SkPaint p; 32 SkPaint p;
33 p.setTextSize(40); 33 p.setTextSize(40);
34 const char text[] = "Click this link!"; 34 const char text[] = "Click this link!";
35 const char url[] = "https://www.google.com/"; 35 const char url[] = "https://www.google.com/";
36 draw_url_annotated_text_with_box(canvas, text, 200.0f, 80.0f, p, url); 36 draw_url_annotated_text_with_box(canvas, text, 200.0f, 80.0f, p, url);
37 SkAutoCanvasRestore autoCanvasRestore2(canvas, true); 37 canvas->saveLayer(nullptr, nullptr);
38 canvas->rotate(90); 38 canvas->rotate(90);
39 draw_url_annotated_text_with_box(canvas, text, 150.0f, -55.0f, p, url); 39 draw_url_annotated_text_with_box(canvas, text, 150.0f, -55.0f, p, url);
40 canvas->restore();
40 } 41 }
OLDNEW
« no previous file with comments | « no previous file | src/doc/SkDocument_PDF.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698