Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
blurtextsmallradii.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkBlurTypes.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkFont.h"
#include "include/core/SkMaskFilter.h"
#include "include/core/SkPaint.h"
#include "tools/fonts/FontToolUtils.h"

Go to the source code of this file.

Functions

 DEF_SIMPLE_GM (blurSmallRadii, canvas, 100, 100)
 

Function Documentation

◆ DEF_SIMPLE_GM()

DEF_SIMPLE_GM ( blurSmallRadii  ,
canvas  ,
100  ,
100   
)

Definition at line 18 of file blurtextsmallradii.cpp.

18 {
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
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
const Paint & paint
SkFont DefaultPortableFont()
font
Font Metadata and Metrics.