Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Decorations.h
Go to the documentation of this file.
1// Copyright 2020 Google LLC.
2#ifndef Decorations_DEFINED
3#define Decorations_DEFINED
4
9
10namespace skia {
11namespace textlayout {
12
14 public:
15 void paint(ParagraphPainter* painter, const TextStyle& textStyle, const TextLine::ClipContext& context, SkScalar baseline);
16
17 private:
18
19 void calculateThickness(TextStyle textStyle, sk_sp<SkTypeface> typeface);
20 void calculatePosition(TextDecoration decoration, SkScalar ascent);
21 void calculatePaint(const TextStyle& textStyle);
22 void calculateWaves(const TextStyle& textStyle, SkRect clip);
23 void calculateGaps(const TextLine::ClipContext& context, const SkRect& rect, SkScalar baseline, SkScalar halo);
24
25 SkScalar fThickness;
26 SkScalar fPosition;
27
28 SkFontMetrics fFontMetrics;
30 SkPath fPath;
31};
32} // namespace textlayout
33} // namespace skia
34#endif
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
Definition SkPath.cpp:3824
const Paint & paint
float SkScalar
Definition extension.cpp:12