OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "gm.h" | 8 #include "gm.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // m.setRotate(SkIntToScalar(30), 0, 0); | 103 // m.setRotate(SkIntToScalar(30), 0, 0); |
104 m.setSkew(SK_Scalar1, 0, 0, 0); | 104 m.setSkew(SK_Scalar1, 0, 0, 0); |
105 // m.postScale(2*SK_Scalar1/3, 2*SK_Scalar1/3); | 105 // m.postScale(2*SK_Scalar1/3, 2*SK_Scalar1/3); |
106 } else { | 106 } else { |
107 SkScalar scale = 11*SK_Scalar1/12; | 107 SkScalar scale = 11*SK_Scalar1/12; |
108 m.setScale(scale, scale); | 108 m.setScale(scale, scale); |
109 } | 109 } |
110 s->setLocalMatrix(m); | 110 s->setLocalMatrix(m); |
111 | 111 |
112 paint.setShader(s)->unref(); | 112 paint.setShader(s)->unref(); |
113 paint.setFilterBitmap(fDoFilter); | 113 paint.setFilterLevel(fDoFilter ? SkPaint::kLow_FilterLevel : SkPaint::kN
one_FilterLevel); |
114 | 114 |
115 canvas->translate(SkIntToScalar(50), SkIntToScalar(50)); | 115 canvas->translate(SkIntToScalar(50), SkIntToScalar(50)); |
116 | 116 |
117 // SkRect r = SkRect::MakeXYWH(-50, -50, 32, 16); | 117 // SkRect r = SkRect::MakeXYWH(-50, -50, 32, 16); |
118 // canvas->drawRect(r, paint); return; | 118 // canvas->drawRect(r, paint); return; |
119 canvas->drawPaint(paint); | 119 canvas->drawPaint(paint); |
120 } | 120 } |
121 | 121 |
122 private: | 122 private: |
123 typedef GM INHERITED; | 123 typedef GM INHERITED; |
(...skipping 21 matching lines...) Expand all Loading... |
145 static skiagm::GMRegistry reg010(G010); | 145 static skiagm::GMRegistry reg010(G010); |
146 static skiagm::GMRegistry reg110(G110); | 146 static skiagm::GMRegistry reg110(G110); |
147 static skiagm::GMRegistry reg210(G210); | 147 static skiagm::GMRegistry reg210(G210); |
148 | 148 |
149 static skiagm::GMRegistry reg001(G001); | 149 static skiagm::GMRegistry reg001(G001); |
150 static skiagm::GMRegistry reg101(G101); | 150 static skiagm::GMRegistry reg101(G101); |
151 static skiagm::GMRegistry reg201(G201); | 151 static skiagm::GMRegistry reg201(G201); |
152 static skiagm::GMRegistry reg011(G011); | 152 static skiagm::GMRegistry reg011(G011); |
153 static skiagm::GMRegistry reg111(G111); | 153 static skiagm::GMRegistry reg111(G111); |
154 static skiagm::GMRegistry reg211(G211); | 154 static skiagm::GMRegistry reg211(G211); |
OLD | NEW |