blob: 31b6e0359bc4ce54646b016771175bc39351ed6f [file] [log] [blame]
Hal Canary9b491b22017-11-28 15:10:13 -05001/*
2 * Copyright 2017 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "gm.h"
9
10// http://bug.skia.org/7315
11DEF_SIMPLE_GM(text_scale_skew, canvas, 256, 128) {
12 SkPaint p;
13 p.setTextSize(18.0f);
14 p.setAntiAlias(true);
15 p.setTextAlign(SkPaint::kCenter_Align);
16 float y = 10.0f;
17 for (float scale : { 0.5f, 0.71f, 1.0f, 1.41f, 2.0f }) {
18 p.setTextScaleX(scale);
19 y += p.getFontSpacing();
20 float x = 50.0f;
21 for (float skew : { -0.5f, 0.0f, 0.5f }) {
22 p.setTextSkewX(skew);
23 canvas->drawString("Skia", x, y, p);
24 x += 78.0f;
25 }
26 }
27}