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

Side by Side Diff: gm/internal_links.cpp

Issue 281383013: skiagm::make_isize -> SkISize::Make (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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 | « gm/imageresizetiled.cpp ('k') | gm/inversepaths.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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "gm.h" 8 #include "gm.h"
9 9
10 #include "SkAnnotation.h" 10 #include "SkAnnotation.h"
(...skipping 11 matching lines...) Expand all
22 InternalLinksGM() { 22 InternalLinksGM() {
23 this->setBGColor(0xFFDDDDDD); 23 this->setBGColor(0xFFDDDDDD);
24 } 24 }
25 25
26 protected: 26 protected:
27 virtual SkString onShortName() { 27 virtual SkString onShortName() {
28 return SkString("internal_links"); 28 return SkString("internal_links");
29 } 29 }
30 30
31 virtual SkISize onISize() { 31 virtual SkISize onISize() {
32 return make_isize(700, 500); 32 return SkISize::Make(700, 500);
33 } 33 }
34 34
35 virtual void onDraw(SkCanvas* canvas) { 35 virtual void onDraw(SkCanvas* canvas) {
36 SkAutoTUnref<SkData> name(SkData::NewWithCString("target-a")); 36 SkAutoTUnref<SkData> name(SkData::NewWithCString("target-a"));
37 37
38 canvas->save(); 38 canvas->save();
39 canvas->translate(SkIntToScalar(100), SkIntToScalar(100)); 39 canvas->translate(SkIntToScalar(100), SkIntToScalar(100));
40 drawLabeledRect(canvas, "Link to A", 0, 0); 40 drawLabeledRect(canvas, "Link to A", 0, 0);
41 SkRect rect = SkRect::MakeXYWH(0, 0, SkIntToScalar(50), SkIntToScalar(20 )); 41 SkRect rect = SkRect::MakeXYWH(0, 0, SkIntToScalar(50), SkIntToScalar(20 ));
42 SkAnnotateLinkToDestination(canvas, rect, name.get()); 42 SkAnnotateLinkToDestination(canvas, rect, name.get());
(...skipping 25 matching lines...) Expand all
68 68
69 typedef GM INHERITED; 69 typedef GM INHERITED;
70 }; 70 };
71 71
72 ////////////////////////////////////////////////////////////////////////////// 72 //////////////////////////////////////////////////////////////////////////////
73 73
74 static GM* MyFactory(void*) { return SkNEW(InternalLinksGM); } 74 static GM* MyFactory(void*) { return SkNEW(InternalLinksGM); }
75 static GMRegistry reg(MyFactory); 75 static GMRegistry reg(MyFactory);
76 76
77 } 77 }
OLDNEW
« no previous file with comments | « gm/imageresizetiled.cpp ('k') | gm/inversepaths.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698