Flutter Engine
The Flutter Engine
blurtextsmallradii.cpp
Go to the documentation of this file.
1/*
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/gm.h"
12#include "include/core/SkFont.h"
16
17// GM to check the behavior from chrome bug:745290
18DEF_SIMPLE_GM(blurSmallRadii, canvas, 100, 100) {
19 double sigmas[] = {0.5, 0.75, 1.0, 1.5, 2.5};
22
23 for (auto sigma : sigmas) {
24 paint.setColor(SK_ColorBLACK);
25 paint.setAntiAlias(true);
27 canvas->drawString("Guest", 20, 10, font, paint);
28
29 paint.setMaskFilter(nullptr);
30 paint.setColor(SK_ColorWHITE);
31 canvas->drawString("Guest", 20, 10, font, paint);
32 canvas->translate(0, 20);
33 }
34}
@ kNormal_SkBlurStyle
fuzzy inside and outside
Definition: SkBlurTypes.h:12
constexpr SkColor SK_ColorBLACK
Definition: SkColor.h:103
constexpr SkColor SK_ColorWHITE
Definition: SkColor.h:122
DEF_SIMPLE_GM(blurSmallRadii, canvas, 100, 100)
Definition: SkFont.h:35
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
const Paint & paint
Definition: color_source.cc:38
SkFont DefaultPortableFont()
font
Font Metadata and Metrics.