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

Side by Side Diff: gm/complexclip.cpp

Issue 348323003: use platform-independent font for gm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add include tools for skimage Created 6 years, 6 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/blurs.cpp ('k') | gm/convexpolyclip.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 2011 Google Inc. 3 * Copyright 2011 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 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 //#include "SkParsePath.h" 10 //#include "SkParsePath.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 SkPath clipB; 76 SkPath clipB;
77 clipB.moveTo(SkIntToScalar(40), SkIntToScalar(10)); 77 clipB.moveTo(SkIntToScalar(40), SkIntToScalar(10));
78 clipB.lineTo(SkIntToScalar(190), SkIntToScalar(15)); 78 clipB.lineTo(SkIntToScalar(190), SkIntToScalar(15));
79 clipB.lineTo(SkIntToScalar(195), SkIntToScalar(190)); 79 clipB.lineTo(SkIntToScalar(195), SkIntToScalar(190));
80 clipB.lineTo(SkIntToScalar(40), SkIntToScalar(185)); 80 clipB.lineTo(SkIntToScalar(40), SkIntToScalar(185));
81 clipB.lineTo(SkIntToScalar(155), SkIntToScalar(100)); 81 clipB.lineTo(SkIntToScalar(155), SkIntToScalar(100));
82 clipB.close(); 82 clipB.close();
83 83
84 SkPaint paint; 84 SkPaint paint;
85 paint.setAntiAlias(true); 85 paint.setAntiAlias(true);
86 sk_tool_utils::set_portable_typeface(&paint);
86 paint.setTextSize(SkIntToScalar(20)); 87 paint.setTextSize(SkIntToScalar(20));
87 88
88 static const struct { 89 static const struct {
89 SkRegion::Op fOp; 90 SkRegion::Op fOp;
90 const char* fName; 91 const char* fName;
91 } gOps[] = { //extra spaces in names for measureText 92 } gOps[] = { //extra spaces in names for measureText
92 {SkRegion::kIntersect_Op, "Isect "}, 93 {SkRegion::kIntersect_Op, "Isect "},
93 {SkRegion::kDifference_Op, "Diff " }, 94 {SkRegion::kDifference_Op, "Diff " },
94 {SkRegion::kUnion_Op, "Union "}, 95 {SkRegion::kUnion_Op, "Union "},
95 {SkRegion::kXOR_Op, "Xor " }, 96 {SkRegion::kXOR_Op, "Xor " },
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // aliased and anti-aliased w/ a layer 193 // aliased and anti-aliased w/ a layer
193 static GM* gFact2(void*) { return new ComplexClipGM(false, true); } 194 static GM* gFact2(void*) { return new ComplexClipGM(false, true); }
194 static GM* gFact3(void*) { return new ComplexClipGM(true, true); } 195 static GM* gFact3(void*) { return new ComplexClipGM(true, true); }
195 196
196 static GMRegistry gReg0(gFact0); 197 static GMRegistry gReg0(gFact0);
197 static GMRegistry gReg1(gFact1); 198 static GMRegistry gReg1(gFact1);
198 static GMRegistry gReg2(gFact2); 199 static GMRegistry gReg2(gFact2);
199 static GMRegistry gReg3(gFact3); 200 static GMRegistry gReg3(gFact3);
200 201
201 } 202 }
OLDNEW
« no previous file with comments | « gm/blurs.cpp ('k') | gm/convexpolyclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698