Flutter Engine
The Flutter Engine
third_party
skia
modules
skparagraph
src
Decorations.h
Go to the documentation of this file.
1
// Copyright 2020 Google LLC.
2
#ifndef Decorations_DEFINED
3
#define Decorations_DEFINED
4
5
#include "
include/core/SkPath.h
"
6
#include "
modules/skparagraph/include/ParagraphPainter.h
"
7
#include "
modules/skparagraph/include/TextStyle.h
"
8
#include "
modules/skparagraph/src/TextLine.h
"
9
10
namespace
skia
{
11
namespace
textlayout {
12
13
class
Decorations
{
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;
29
ParagraphPainter::DecorationStyle
fDecorStyle;
30
SkPath
fPath;
31
};
32
}
// namespace textlayout
33
}
// namespace skia
34
#endif
ParagraphPainter.h
clip
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
Definition:
SkPath.cpp:3892
SkPath.h
TextLine.h
TextStyle.h
SkPath
Definition:
SkPath.h:59
sk_sp< SkTypeface >
skia::textlayout::Decorations
Definition:
Decorations.h:13
skia::textlayout::Decorations::paint
void paint(ParagraphPainter *painter, const TextStyle &textStyle, const TextLine::ClipContext &context, SkScalar baseline)
Definition:
Decorations.cpp:24
skia::textlayout::ParagraphPainter::DecorationStyle
Definition:
ParagraphPainter.h:26
skia::textlayout::ParagraphPainter
Definition:
ParagraphPainter.h:14
skia::textlayout::TextStyle
Definition:
TextStyle.h:151
SkScalar
float SkScalar
Definition:
extension.cpp:12
SkRecords::rect
sk_sp< SkBlender > blender SkRect rect
Definition:
SkRecords.h:350
gen_test_font.ascent
ascent
Definition:
gen_test_font.py:32
skia::textlayout::TextDecoration
TextDecoration
Definition:
TextStyle.h:41
skia
Definition:
DartTypes.h:13
SkFontMetrics
Definition:
SkFontMetrics.h:18
SkRect
Definition:
extension.cpp:13
skia::textlayout::TextLine::ClipContext
Definition:
TextLine.h:31
Generated on Sun Jun 23 2024 21:56:06 for Flutter Engine by
1.9.4