| 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 "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
| 10 #include "SkBlurMaskFilter.h" | 10 #include "SkBlurMaskFilter.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 paint->setMaskFilter(SkBlurMaskFilter::CreateEmboss(dir, SK_Scalar1/4, SkInt
ToScalar(4), SkIntToScalar(3)))->unref(); | 168 paint->setMaskFilter(SkBlurMaskFilter::CreateEmboss(dir, SK_Scalar1/4, SkInt
ToScalar(4), SkIntToScalar(3)))->unref(); |
| 169 #endif | 169 #endif |
| 170 paint->setColor(SK_ColorBLUE); | 170 paint->setColor(SK_ColorBLUE); |
| 171 } | 171 } |
| 172 | 172 |
| 173 class TextEffectsGM : public skiagm::GM { | 173 class TextEffectsGM : public skiagm::GM { |
| 174 public: | 174 public: |
| 175 TextEffectsGM() {} | 175 TextEffectsGM() {} |
| 176 | 176 |
| 177 protected: | 177 protected: |
| 178 SkString onShortName() SK_OVERRIDE { | 178 SkString onShortName() override { |
| 179 return SkString("texteffects"); | 179 return SkString("texteffects"); |
| 180 } | 180 } |
| 181 | 181 |
| 182 SkISize onISize() SK_OVERRIDE { | 182 SkISize onISize() override { |
| 183 return SkISize::Make(460, 680); | 183 return SkISize::Make(460, 680); |
| 184 } | 184 } |
| 185 | 185 |
| 186 void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 186 void onDraw(SkCanvas* canvas) override { |
| 187 canvas->save(); | 187 canvas->save(); |
| 188 | 188 |
| 189 SkPaint paint; | 189 SkPaint paint; |
| 190 paint.setAntiAlias(true); | 190 paint.setAntiAlias(true); |
| 191 sk_tool_utils::set_portable_typeface(&paint); | 191 sk_tool_utils::set_portable_typeface(&paint); |
| 192 paint.setTextSize(SkIntToScalar(56)); | 192 paint.setTextSize(SkIntToScalar(56)); |
| 193 | 193 |
| 194 SkScalar x = SkIntToScalar(20); | 194 SkScalar x = SkIntToScalar(20); |
| 195 SkScalar y = paint.getTextSize(); | 195 SkScalar y = paint.getTextSize(); |
| 196 | 196 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 211 } | 211 } |
| 212 | 212 |
| 213 private: | 213 private: |
| 214 typedef skiagm::GM INHERITED; | 214 typedef skiagm::GM INHERITED; |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 ////////////////////////////////////////////////////////////////////////////// | 217 ////////////////////////////////////////////////////////////////////////////// |
| 218 | 218 |
| 219 static skiagm::GM* MyFactory(void*) { return new TextEffectsGM; } | 219 static skiagm::GM* MyFactory(void*) { return new TextEffectsGM; } |
| 220 static skiagm::GMRegistry reg(MyFactory); | 220 static skiagm::GMRegistry reg(MyFactory); |
| OLD | NEW |