Flutter Engine
The Flutter Engine
ParagraphPainterImpl.h
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
2#ifndef ParagraphPainterImpl_DEFINED
3#define ParagraphPainterImpl_DEFINED
4
7
8namespace skia {
9namespace textlayout {
10
12public:
14
15 void drawTextBlob(const sk_sp<SkTextBlob>& blob, SkScalar x, SkScalar y, const SkPaintOrID& paint) override;
16 void drawTextShadow(const sk_sp<SkTextBlob>& blob, SkScalar x, SkScalar y, SkColor color, SkScalar blurSigma) override;
17 void drawRect(const SkRect& rect, const SkPaintOrID& paint) override;
18 void drawFilledRect(const SkRect& rect, const DecorationStyle& decorStyle) override;
19 void drawPath(const SkPath& path, const DecorationStyle& decorStyle) override;
20 void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const DecorationStyle& decorStyle) override;
21
22 void clipRect(const SkRect& rect) override;
23 void translate(SkScalar dx, SkScalar dy) override;
24
25 void save() override;
26 void restore() override;
27
28private:
29 SkCanvas* fCanvas;
30};
31
33public:
35 : fPainter(painter) {
36 fPainter->save();
37 }
38
40 fPainter->restore();
41 }
42
43private:
44 ParagraphPainter* fPainter;
45};
46
47} // namespace textlayout
48} // namespace skia
49
50#endif // ParagraphPainterImpl_DEFINED
uint32_t SkColor
Definition: SkColor.h:37
Definition: SkPath.h:59
void drawPath(const SkPath &path, const DecorationStyle &decorStyle) override
void translate(SkScalar dx, SkScalar dy) override
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const DecorationStyle &decorStyle) override
void drawTextShadow(const sk_sp< SkTextBlob > &blob, SkScalar x, SkScalar y, SkColor color, SkScalar blurSigma) override
void clipRect(const SkRect &rect) override
void drawFilledRect(const SkRect &rect, const DecorationStyle &decorStyle) override
void drawTextBlob(const sk_sp< SkTextBlob > &blob, SkScalar x, SkScalar y, const SkPaintOrID &paint) override
void drawRect(const SkRect &rect, const SkPaintOrID &paint) override
ParagraphPainterAutoRestore(ParagraphPainter *painter)
std::variant< SkPaint, PaintID > SkPaintOrID
const Paint & paint
Definition: color_source.cc:38
DlColor color
float SkScalar
Definition: extension.cpp:12
double y
double x
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
Definition: SkRecords.h:208
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57
Definition: DartTypes.h:13