| * Copyright 2013 Google Inc. |
| * Use of this source code is governed by a BSD-style license that can be |
| * found in the LICENSE file. |
| * Skia may draw from outlines when the size is very large, so we exercise that |
| class BigTextGM : public skiagm::GM { |
| virtual SkString onShortName() SK_OVERRIDE { |
| return SkString("bigtext"); |
| virtual SkISize onISize() SK_OVERRIDE { |
| return SkISize::Make(640, 480); |
| virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
| paint.setAntiAlias(true); |
| (void)paint.measureText("/", 1, &r); |
| this->width()/2 - r.centerX(), |
| this->height()/2 - r.centerY() |
| paint.setColor(SK_ColorRED); |
| canvas->drawText("/", 1, pos.fX, pos.fY, paint); |
| paint.setColor(SK_ColorBLUE); |
| canvas->drawPosText("\\", 1, &pos, paint); |
| typedef skiagm::GM INHERITED; |
| DEF_GM( return SkNEW(BigTextGM); ) |