OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |