2 * Copyright 2013 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
9 #include "sk_tool_utils.h"
14 * Skia may draw from outlines when the size is very large, so we exercise that
18 class BigTextGM : public skiagm::GM {
24 SkString onShortName() override {
25 return SkString("bigtext");
28 SkISize onISize() override {
29 return SkISize::Make(640, 480);
32 void onDraw(SkCanvas* canvas) override {
34 paint.setAntiAlias(true);
35 sk_tool_utils::set_portable_typeface(&paint);
36 paint.setTextSize(1500);
39 (void)paint.measureText("/", 1, &r);
41 this->width()/2 - r.centerX(),
42 this->height()/2 - r.centerY()
45 paint.setColor(SK_ColorRED);
46 canvas->drawString("/", pos.fX, pos.fY, paint);
48 paint.setColor(SK_ColorBLUE);
49 canvas->drawPosText("\\", 1, &pos, paint);
53 typedef skiagm::GM INHERITED;
56 DEF_GM(return new BigTextGM;)