| Flutter Impeller |

Public Member Functions | List of all members
impeller::interop::DisplayListBuilder Class Referencefinal

`#include <dl_builder.h>`

Inheritance diagram for impeller::interop::DisplayListBuilder:

## Public Member Functions
| DisplayListBuilder (const ImpellerRect *rect)
| ~DisplayListBuilder () override
| DisplayListBuilder (const DisplayListBuilder &)=delete
DisplayListBuilder & | operator= (const DisplayListBuilder &)=delete
void | Save ()
void | SaveLayer (const Rect &bounds, const Paint *paint, const ImageFilter *backdrop)
void | Restore ()
void | Scale (Size scale)
void | Rotate (Degrees angle)
void | Translate (Point translation)
Matrix | GetTransform () const
void | SetTransform (const Matrix &matrix)
void | Transform (const Matrix &matrix)
void | ResetTransform ()
uint32_t | GetSaveCount () const
void | RestoreToCount (uint32_t count)
void | ClipRect (const Rect &rect, flutter::DlCanvas::ClipOp op)
void | ClipOval (const Rect &rect, flutter::DlCanvas::ClipOp op)
void | ClipRoundedRect (const Rect &rect, const RoundingRadii &radii, flutter::DlCanvas::ClipOp op)
void | ClipPath (const Path &path, flutter::DlCanvas::ClipOp op)
void | DrawPaint (const Paint &paint)
void | DrawLine (const Point &from, const Point &to, const Paint &paint)
void | DrawDashedLine (const Point &from, const Point &to, Scalar on_length, Scalar off_length, const Paint &paint)
void | DrawRect (const Rect &rect, const Paint &paint)
void | DrawOval (const Rect &oval_bounds, const Paint &paint)
void | DrawRoundedRect (const Rect &rect, const RoundingRadii &radii, const Paint &paint)
void | DrawRoundedRectDifference (const Rect &outer_rect, const RoundingRadii &outer_radii, const Rect &inner_rect, const RoundingRadii &inner_radii, const Paint &paint)
void | DrawPath (const Path &path, const Paint &paint)
void | DrawTexture (const Texture &texture, const Point &point, flutter::DlImageSampling sampling, const Paint *paint)
void | DrawTextureRect (const Texture &texture, const Rect &src_rect, const Rect &dst_rect, flutter::DlImageSampling sampling, const Paint *paint)
void | DrawDisplayList (const DisplayList &dl, Scalar opacity)
void | DrawParagraph (const Paragraph &paragraph, Point point)
ScopedObject< DisplayList > | Build ()
Public Member Functions inherited from impeller::interop::ObjectBase
| ObjectBase ()=default
virtual | ~ObjectBase ()=default
| ObjectBase (const ObjectBase &)=delete
| ObjectBase (ObjectBase &&)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
ObjectBase & | operator= (ObjectBase &&)=delete
void | Retain ()
void | Release ()
uint64_t | GetRefCountForTests () const

## Additional Inherited Members
Public Types inherited from impeller::interop::Object< DisplayListBuilder, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerDisplayListBuilder)>
using | InteropClass = DisplayListBuilder
using | InteropCSibling = IMPELLER_INTERNAL_HANDLE_NAME(ImpellerDisplayListBuilder)
Static Public Member Functions inherited from impeller::interop::ObjectBase
static void | SafeRetain (void *ptr)
static void | SafeRelease (void *ptr)

## Detailed Description

Definition at line 24 of file dl_builder.h.

## Constructor & Destructor Documentation

## ◆ DisplayListBuilder() [1/2]

impeller::interop::DisplayListBuilder::DisplayListBuilder | ( | const ImpellerRect * | rect | ) |
| explicit

Definition at line 11 of file dl_builder.cc.

12 : builder_(rect) {}

## ◆ ~DisplayListBuilder()

impeller::interop::DisplayListBuilder::~DisplayListBuilder | ( |  | ) |
| override default

## ◆ DisplayListBuilder() [2/2]

impeller::interop::DisplayListBuilder::DisplayListBuilder | ( | const DisplayListBuilder & |  | ) |
| delete

## Member Function Documentation

## ◆ Build()

ScopedObject< DisplayList > impeller::interop::DisplayListBuilder::Build | ( |  | ) |

Definition at line 145 of file dl_builder.cc.

145 {
146 return Create<DisplayList>(builder_.Build());
147 }

## ◆ ClipOval()

void impeller::interop::DisplayListBuilder::ClipOval | ( | const Rect & | rect,
|  | flutter::DlCanvas::ClipOp | op
| ) |  |

Definition at line 74 of file dl_builder.cc.

75 {
76 builder_.ClipOval(rect, op);
77 }

## ◆ ClipPath()

void impeller::interop::DisplayListBuilder::ClipPath | ( | const Path & | path,
|  | flutter::DlCanvas::ClipOp | op
| ) |  |

Definition at line 85 of file dl_builder.cc.

86 {
87 builder_.ClipPath(flutter::DlPath(path.GetPath()), op);
88 }
impeller::DlPath
flutter::DlPath DlPath
Definition: dl_dispatcher.h:28

References impeller::interop::Path::GetPath().

## ◆ ClipRect()

void impeller::interop::DisplayListBuilder::ClipRect | ( | const Rect & | rect,
|  | flutter::DlCanvas::ClipOp | op
| ) |  |

Definition at line 69 of file dl_builder.cc.

70 {
71 builder_.ClipRect(rect, op);
72 }

## ◆ ClipRoundedRect()

void impeller::interop::DisplayListBuilder::ClipRoundedRect | ( | const Rect & | rect,
|  | const RoundingRadii & | radii,
|  | flutter::DlCanvas::ClipOp | op
| ) |  |

Definition at line 79 of file dl_builder.cc.

81 {
82 builder_.ClipRoundRect(RoundRect::MakeRectRadii(rect, radii), op);
83 }
impeller::RoundRect::MakeRectRadii
static RoundRect MakeRectRadii(const Rect &rect, const RoundingRadii &radii)
Definition: round_rect.cc:9

References impeller::RoundRect::MakeRectRadii().

## ◆ DrawDashedLine()

void impeller::interop::DisplayListBuilder::DrawDashedLine | ( | const Point & | from,
|  | const Point & | to,
|  | Scalar | on_length,
|  | Scalar | off_length,
|  | const Paint & | paint
| ) |  |

Definition at line 132 of file dl_builder.cc.

136 {
137 builder_.DrawDashedLine(from, //
138 to, //
139 on_length, //
140 off_length, //
141 paint.GetPaint() //
142 );
143 }

References impeller::interop::Paint::GetPaint().

## ◆ DrawDisplayList()

void impeller::interop::DisplayListBuilder::DrawDisplayList | ( | const DisplayList & | dl,
|  | Scalar | opacity
| ) |  |

Definition at line 149 of file dl_builder.cc.

150 {
151 builder_.DrawDisplayList(dl.GetDisplayList(), opacity);
152 }

References impeller::interop::DisplayList::GetDisplayList().

## ◆ DrawLine()

void impeller::interop::DisplayListBuilder::DrawLine | ( | const Point & | from,
|  | const Point & | to,
|  | const Paint & | paint
| ) |  |

Definition at line 126 of file dl_builder.cc.

128 {
129 builder_.DrawLine(from, to, paint.GetPaint());
130 }

References impeller::interop::Paint::GetPaint().

## ◆ DrawOval()

void impeller::interop::DisplayListBuilder::DrawOval | ( | const Rect & | oval_bounds,
|  | const Paint & | paint
| ) |  |

Definition at line 94 of file dl_builder.cc.

94 {
95 builder_.DrawOval(oval_bounds, paint.GetPaint());
96 }

References impeller::interop::Paint::GetPaint().

## ◆ DrawPaint()

void impeller::interop::DisplayListBuilder::DrawPaint | ( | const Paint & | paint | ) |

Definition at line 122 of file dl_builder.cc.

122 {
123 builder_.DrawPaint(paint.GetPaint());
124 }

References impeller::interop::Paint::GetPaint().

## ◆ DrawParagraph()

void impeller::interop::DisplayListBuilder::DrawParagraph | ( | const Paragraph & | paragraph,
|  | Point | point
| ) |  |

Definition at line 178 of file dl_builder.cc.

179 {
180 const auto& handle = paragraph.GetHandle();
181 if (!handle) {
182 return;
183 }
184 handle->Paint(&builder_, point.x, point.y);
185 }

References impeller::interop::Paragraph::GetHandle(), impeller::TPoint< T >::x, and impeller::TPoint< T >::y.

## ◆ DrawPath()

void impeller::interop::DisplayListBuilder::DrawPath | ( | const Path & | path,
|  | const Paint & | paint
| ) |  |

Definition at line 118 of file dl_builder.cc.

118 {
119 builder_.DrawPath(flutter::DlPath(path.GetPath()), paint.GetPaint());
120 }

References impeller::interop::Paint::GetPaint(), and impeller::interop::Path::GetPath().

## ◆ DrawRect()

void impeller::interop::DisplayListBuilder::DrawRect | ( | const Rect & | rect,
|  | const Paint & | paint
| ) |  |

Definition at line 90 of file dl_builder.cc.

90 {
91 builder_.DrawRect(rect, paint.GetPaint());
92 }

References impeller::interop::Paint::GetPaint().

## ◆ DrawRoundedRect()

void impeller::interop::DisplayListBuilder::DrawRoundedRect | ( | const Rect & | rect,
|  | const RoundingRadii & | radii,
|  | const Paint & | paint
| ) |  |

Definition at line 98 of file dl_builder.cc.

100 {
101 builder_.DrawRoundRect(RoundRect::MakeRectRadii(rect, radii),
102 paint.GetPaint());
103 }

References impeller::interop::Paint::GetPaint(), and impeller::RoundRect::MakeRectRadii().

## ◆ DrawRoundedRectDifference()

void impeller::interop::DisplayListBuilder::DrawRoundedRectDifference | ( | const Rect & | outer_rect,
|  | const RoundingRadii & | outer_radii,
|  | const Rect & | inner_rect,
|  | const RoundingRadii & | inner_radii,
|  | const Paint & | paint
| ) |  |

Definition at line 105 of file dl_builder.cc.

110 {
111 builder_.DrawDiffRoundRect(
112 RoundRect::MakeRectRadii(outer_rect, outer_radii), //
113 RoundRect::MakeRectRadii(inner_rect, inner_radii), //
114 paint.GetPaint() //
115 );
116 }

References impeller::interop::Paint::GetPaint(), and impeller::RoundRect::MakeRectRadii().

## ◆ DrawTexture()

void impeller::interop::DisplayListBuilder::DrawTexture | ( | const Texture & | texture,
|  | const Point & | point,
|  | flutter::DlImageSampling | sampling,
|  | const Paint * | paint
| ) |  |

Definition at line 154 of file dl_builder.cc.

157 {
158 builder_.DrawImage(texture.MakeImage(), //
159 point, //
160 sampling, //
161 paint == nullptr ? nullptr : &paint->GetPaint() //
162 );
163 }

References impeller::interop::Paint::GetPaint(), and impeller::interop::Texture::MakeImage().

## ◆ DrawTextureRect()

void impeller::interop::DisplayListBuilder::DrawTextureRect | ( | const Texture & | texture,
|  | const Rect & | src_rect,
|  | const Rect & | dst_rect,
|  | flutter::DlImageSampling | sampling,
|  | const Paint * | paint
| ) |  |

Definition at line 165 of file dl_builder.cc.

169 {
170 builder_.DrawImageRect(texture.MakeImage(), //
171 src_rect, //
172 dst_rect, //
173 sampling, //
174 paint == nullptr ? nullptr : &paint->GetPaint() //
175 );
176 }

References impeller::interop::Paint::GetPaint(), and impeller::interop::Texture::MakeImage().

## ◆ GetSaveCount()

uint32_t impeller::interop::DisplayListBuilder::GetSaveCount | ( |  | ) | const

Definition at line 61 of file dl_builder.cc.

61 {
62 return builder_.GetSaveCount();
63 }

## ◆ GetTransform()

Matrix impeller::interop::DisplayListBuilder::GetTransform | ( |  | ) | const

Definition at line 45 of file dl_builder.cc.

45 {
46 return builder_.GetMatrix();
47 }

## ◆ operator=()

DisplayListBuilder& impeller::interop::DisplayListBuilder::operator= | ( | const DisplayListBuilder & |  | ) |
| delete

## ◆ ResetTransform()

void impeller::interop::DisplayListBuilder::ResetTransform | ( |  | ) |

Definition at line 57 of file dl_builder.cc.

57 {
58 builder_.TransformReset();
59 }

## ◆ Restore()

void impeller::interop::DisplayListBuilder::Restore | ( |  | ) |

Definition at line 29 of file dl_builder.cc.

29 {
30 builder_.Restore();
31 }

## ◆ RestoreToCount()

void impeller::interop::DisplayListBuilder::RestoreToCount | ( | uint32_t | count | ) |

Definition at line 65 of file dl_builder.cc.

65 {
66 builder_.RestoreToCount(count);
67 }

## ◆ Rotate()

void impeller::interop::DisplayListBuilder::Rotate | ( | Degrees | angle | ) |

Definition at line 37 of file dl_builder.cc.

37 {
38 builder_.Rotate(angle.degrees);
39 }

References impeller::Degrees::degrees.

## ◆ Save()

void impeller::interop::DisplayListBuilder::Save | ( |  | ) |

Definition at line 16 of file dl_builder.cc.

16 {
17 builder_.Save();
18 }

## ◆ SaveLayer()

void impeller::interop::DisplayListBuilder::SaveLayer | ( | const Rect & | bounds,
|  | const Paint * | paint,
|  | const ImageFilter * | backdrop
| ) |  |

Definition at line 20 of file dl_builder.cc.

22 {
23 builder_.SaveLayer(
24 bounds, //
25 paint == nullptr ? nullptr : &paint->GetPaint(), //
26 backdrop == nullptr ? nullptr : backdrop->GetImageFilter().get());
27 }

References impeller::interop::ImageFilter::GetImageFilter(), and impeller::interop::Paint::GetPaint().

## ◆ Scale()

void impeller::interop::DisplayListBuilder::Scale | ( | Size | scale | ) |

Definition at line 33 of file dl_builder.cc.

33 {
34 builder_.Scale(scale.width, scale.height);
35 }
scale
const Scalar scale
Definition: stroke_path_geometry.cc:316

References scale.

## ◆ SetTransform()

void impeller::interop::DisplayListBuilder::SetTransform | ( | const Matrix & | matrix | ) |

Definition at line 49 of file dl_builder.cc.

49 {
50 builder_.SetTransform(matrix);
51 }

## ◆ Transform()

void impeller::interop::DisplayListBuilder::Transform | ( | const Matrix & | matrix | ) |

Definition at line 53 of file dl_builder.cc.

53 {
54 builder_.Transform(matrix);
55 }

## ◆ Translate()

void impeller::interop::DisplayListBuilder::Translate | ( | Point | translation | ) |

Definition at line 41 of file dl_builder.cc.

41 {
42 builder_.Translate(translation.x, translation.y);
43 }

References impeller::TPoint< T >::x, and impeller::TPoint< T >::y.

The documentation for this class was generated from the following files:

- impeller/toolkit/interop/dl_builder.h
- impeller/toolkit/interop/dl_builder.cc