Flutter Impeller
formats.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_IMPELLER_TOOLKIT_INTEROP_FORMATS_H_
6 #define FLUTTER_IMPELLER_TOOLKIT_INTEROP_FORMATS_H_
7 
8 #include <vector>
9 
10 #include "flutter/display_list/dl_builder.h"
11 #include "flutter/display_list/dl_color.h"
12 #include "flutter/third_party/txt/src/txt/font_style.h"
13 #include "flutter/third_party/txt/src/txt/font_weight.h"
14 #include "flutter/third_party/txt/src/txt/paragraph_style.h"
15 #include "impeller/entity/entity.h"
20 #include "impeller/geometry/rect.h"
21 #include "impeller/geometry/size.h"
23 
24 namespace impeller::interop {
25 
26 constexpr std::optional<SkRect> ToSkiaType(const ImpellerRect* rect) {
27  if (!rect) {
28  return std::nullopt;
29  }
30  return SkRect::MakeXYWH(rect->x, rect->y, rect->width, rect->height);
31 }
32 
33 constexpr SkPoint ToSkiaType(const Point& point) {
34  return SkPoint::Make(point.x, point.y);
35 }
36 
37 constexpr SkRect ToSkiaType(const Rect& rect) {
38  return SkRect::MakeXYWH(rect.GetX(), //
39  rect.GetY(), //
40  rect.GetWidth(), //
41  rect.GetHeight() //
42  );
43 }
44 
45 constexpr SkPathFillType ToSkiaType(FillType type) {
46  switch (type) {
47  case FillType::kNonZero:
48  return SkPathFillType::kWinding;
49  case FillType::kOdd:
50  return SkPathFillType::kEvenOdd;
51  }
52  return SkPathFillType::kWinding;
53 }
54 
55 constexpr SkIRect ToSkiaType(IRect rect) {
56  return SkIRect::MakeXYWH(rect.GetX(), //
57  rect.GetY(), //
58  rect.GetWidth(), //
59  rect.GetHeight() //
60  );
61 }
62 
63 template <class SkiaType, class OtherType>
64 std::vector<SkiaType> ToSkiaType(const std::vector<OtherType>& other_vec) {
65  std::vector<SkiaType> skia_vec;
66  skia_vec.reserve(other_vec.size());
67  for (const auto& other : other_vec) {
68  skia_vec.emplace_back(ToSkiaType(other));
69  }
70  return skia_vec;
71 }
72 
73 constexpr flutter::DlColor ToDisplayListType(Color color) {
74  return flutter::DlColor::RGBA(color.red, //
75  color.green, //
76  color.blue, //
77  color.alpha //
78  );
79 }
80 
81 constexpr SkMatrix ToSkMatrix(const Matrix& matrix) {
82  return SkM44::ColMajor(matrix.m).asM33();
83 }
84 
85 template <class DlType, class OtherType>
86 std::vector<DlType> ToDisplayListType(const std::vector<OtherType>& other_vec) {
87  std::vector<DlType> dl_vec;
88  dl_vec.reserve(other_vec.size());
89  for (const auto& other : other_vec) {
90  dl_vec.emplace_back(ToDisplayListType(other));
91  }
92  return dl_vec;
93 }
94 
95 constexpr flutter::DlImageSampling ToDisplayListType(
96  ImpellerTextureSampling sampling) {
97  switch (sampling) {
99  return flutter::DlImageSampling::kNearestNeighbor;
101  return flutter::DlImageSampling::kLinear;
102  }
103  return flutter::DlImageSampling::kLinear;
104 }
105 
106 constexpr flutter::DlBlurStyle ToDisplayListType(ImpellerBlurStyle style) {
107  switch (style) {
109  return flutter::DlBlurStyle::kNormal;
111  return flutter::DlBlurStyle::kSolid;
113  return flutter::DlBlurStyle::kOuter;
115  return flutter::DlBlurStyle::kInner;
116  }
117  return flutter::DlBlurStyle::kNormal;
118 }
119 
120 constexpr flutter::DlBlendMode ToDisplayListType(BlendMode mode) {
121  using Mode = flutter::DlBlendMode;
122  switch (mode) {
123  case BlendMode::kClear:
124  return Mode::kClear;
125  case BlendMode::kSource:
126  return Mode::kSrc;
128  return Mode::kDst;
130  return Mode::kSrcOver;
132  return Mode::kDstOver;
134  return Mode::kSrcIn;
136  return Mode::kDstIn;
138  return Mode::kSrcOut;
140  return Mode::kDstOut;
142  return Mode::kSrcATop;
144  return Mode::kDstATop;
145  case BlendMode::kXor:
146  return Mode::kXor;
147  case BlendMode::kPlus:
148  return Mode::kPlus;
150  return Mode::kModulate;
151  case BlendMode::kScreen:
152  return Mode::kScreen;
153  case BlendMode::kOverlay:
154  return Mode::kOverlay;
155  case BlendMode::kDarken:
156  return Mode::kDarken;
157  case BlendMode::kLighten:
158  return Mode::kLighten;
160  return Mode::kColorDodge;
162  return Mode::kColorBurn;
164  return Mode::kHardLight;
166  return Mode::kSoftLight;
168  return Mode::kDifference;
170  return Mode::kExclusion;
172  return Mode::kMultiply;
173  case BlendMode::kHue:
174  return Mode::kHue;
176  return Mode::kSaturation;
177  case BlendMode::kColor:
178  return Mode::kColor;
180  return Mode::kLuminosity;
181  }
182  return Mode::kSrcOver;
183 }
184 
185 inline SkRRect ToSkiaType(const Rect& rect,
187  using Corner = SkRRect::Corner;
188  SkVector sk_radii[4];
189  sk_radii[Corner::kUpperLeft_Corner] = ToSkiaType(radii.top_left);
190  sk_radii[Corner::kUpperRight_Corner] = ToSkiaType(radii.top_right);
191  sk_radii[Corner::kLowerRight_Corner] = ToSkiaType(radii.bottom_right);
192  sk_radii[Corner::kLowerLeft_Corner] = ToSkiaType(radii.bottom_left);
193  SkRRect result;
194  result.setRectRadii(ToSkiaType(rect), sk_radii);
195  return result;
196 }
197 
198 constexpr Matrix ToImpellerType(const ImpellerMatrix& m) {
199  return Matrix(m.m[0], m.m[1], m.m[2], m.m[3], //
200  m.m[4], m.m[5], m.m[6], m.m[7], //
201  m.m[8], m.m[9], m.m[10], m.m[11], //
202  m.m[12], m.m[13], m.m[14], m.m[15] //
203  );
204 }
205 
206 constexpr void FromImpellerType(const Matrix& from, ImpellerMatrix& to) {
207  to.m[0] = from.m[0];
208  to.m[1] = from.m[1];
209  to.m[2] = from.m[2];
210  to.m[3] = from.m[3];
211  to.m[4] = from.m[4];
212  to.m[5] = from.m[5];
213  to.m[6] = from.m[6];
214  to.m[7] = from.m[7];
215  to.m[8] = from.m[8];
216  to.m[9] = from.m[9];
217  to.m[10] = from.m[10];
218  to.m[11] = from.m[11];
219  to.m[12] = from.m[12];
220  to.m[13] = from.m[13];
221  to.m[14] = from.m[14];
222  to.m[15] = from.m[15];
223 }
224 
225 constexpr Size ToImpellerType(const ImpellerSize& size) {
226  return Size{size.width, size.height};
227 }
228 
229 constexpr Point ToImpellerType(const ImpellerPoint& point) {
230  return Point{point.x, point.y};
231 }
232 
233 constexpr Rect ToImpellerType(const ImpellerRect& rect) {
234  return Rect::MakeXYWH(rect.x, rect.y, rect.width, rect.height);
235 }
236 
237 constexpr flutter::DlTileMode ToDisplayListType(ImpellerTileMode mode) {
238  switch (mode) {
240  return flutter::DlTileMode::kClamp;
242  return flutter::DlTileMode::kRepeat;
244  return flutter::DlTileMode::kMirror;
246  return flutter::DlTileMode::kDecal;
247  }
248  return flutter::DlTileMode::kClamp;
249 }
250 
252  const ImpellerRoundingRadii& radii) {
253  auto result = impeller::PathBuilder::RoundingRadii{};
254  result.top_left = ToImpellerType(radii.top_left);
255  result.bottom_left = ToImpellerType(radii.bottom_left);
256  result.top_right = ToImpellerType(radii.top_right);
257  result.bottom_right = ToImpellerType(radii.bottom_right);
258  return result;
259 }
260 
262  switch (type) {
264  return FillType::kNonZero;
266  return FillType::kOdd;
267  }
268  return FillType::kNonZero;
269 }
270 
271 constexpr flutter::DlCanvas::ClipOp ToImpellerType(ImpellerClipOperation op) {
272  switch (op) {
274  return flutter::DlCanvas::ClipOp::kDifference;
276  return flutter::DlCanvas::ClipOp::kIntersect;
277  }
278  return flutter::DlCanvas::ClipOp::kDifference;
279 }
280 
282  Color result;
283  result.red = color.red;
284  result.green = color.green;
285  result.blue = color.blue;
286  result.alpha = color.alpha;
287  return result;
288 }
289 
291  switch (mode) {
293  return BlendMode::kClear;
295  return BlendMode::kSource;
299  return BlendMode::kSourceOver;
303  return BlendMode::kSourceIn;
307  return BlendMode::kSourceOut;
311  return BlendMode::kSourceATop;
315  return BlendMode::kXor;
317  return BlendMode::kPlus;
319  return BlendMode::kModulate;
321  return BlendMode::kScreen;
323  return BlendMode::kOverlay;
325  return BlendMode::kDarken;
327  return BlendMode::kLighten;
329  return BlendMode::kColorDodge;
331  return BlendMode::kColorBurn;
333  return BlendMode::kHardLight;
335  return BlendMode::kSoftLight;
337  return BlendMode::kDifference;
339  return BlendMode::kExclusion;
341  return BlendMode::kMultiply;
343  return BlendMode::kHue;
345  return BlendMode::kSaturation;
347  return BlendMode::kColor;
349  return BlendMode::kLuminosity;
350  }
351  return BlendMode::kSourceOver;
352 }
353 
354 constexpr flutter::DlDrawStyle ToDisplayListType(ImpellerDrawStyle style) {
355  switch (style) {
357  return flutter::DlDrawStyle::kFill;
359  return flutter::DlDrawStyle::kStroke;
361  return flutter::DlDrawStyle::kStrokeAndFill;
362  }
363  return flutter::DlDrawStyle::kFill;
364 }
365 
366 constexpr flutter::DlStrokeCap ToDisplayListType(ImpellerStrokeCap cap) {
367  switch (cap) {
369  return flutter::DlStrokeCap::kButt;
371  return flutter::DlStrokeCap::kRound;
373  return flutter::DlStrokeCap::kSquare;
374  }
375  return flutter::DlStrokeCap::kButt;
376 }
377 
378 constexpr flutter::DlStrokeJoin ToDisplayListType(ImpellerStrokeJoin join) {
379  switch (join) {
381  return flutter::DlStrokeJoin::kMiter;
383  return flutter::DlStrokeJoin::kRound;
385  return flutter::DlStrokeJoin::kBevel;
386  }
387  return flutter::DlStrokeJoin::kMiter;
388 }
389 
391  switch (format) {
394  }
396 }
397 
398 constexpr ISize ToImpellerType(const ImpellerISize& size) {
399  return ISize::MakeWH(size.width, size.height);
400 }
401 
402 constexpr flutter::DlColorSpace ToDisplayListType(
403  ImpellerColorSpace color_space) {
404  switch (color_space) {
406  return flutter::DlColorSpace::kSRGB;
408  return flutter::DlColorSpace::kExtendedSRGB;
410  return flutter::DlColorSpace::kDisplayP3;
411  }
412  return flutter::DlColorSpace::kSRGB;
413 }
414 
415 constexpr flutter::DlColor ToDisplayListType(ImpellerColor color) {
416  return flutter::DlColor(color.alpha, //
417  color.red, //
418  color.green, //
419  color.blue, //
420  ToDisplayListType(color.color_space) //
421  );
422 }
423 
424 constexpr txt::FontWeight ToTxtType(ImpellerFontWeight weight) {
425  switch (weight) {
427  return txt::FontWeight::w100;
429  return txt::FontWeight::w200;
431  return txt::FontWeight::w300;
433  return txt::FontWeight::w400;
435  return txt::FontWeight::w500;
437  return txt::FontWeight::w600;
439  return txt::FontWeight::w700;
441  return txt::FontWeight::w800;
443  return txt::FontWeight::w900;
444  }
445  return txt::FontWeight::w400;
446 }
447 
448 constexpr txt::FontStyle ToTxtType(ImpellerFontStyle style) {
449  switch (style) {
451  return txt::FontStyle::normal;
453  return txt::FontStyle::italic;
454  }
455  return txt::FontStyle::normal;
456 }
457 
458 constexpr txt::TextAlign ToTxtType(ImpellerTextAlignment align) {
459  switch (align) {
461  return txt::TextAlign::left;
463  return txt::TextAlign::right;
465  return txt::TextAlign::center;
467  return txt::TextAlign::justify;
469  return txt::TextAlign::start;
471  return txt::TextAlign::end;
472  }
473  return txt::TextAlign::left;
474 }
475 
476 constexpr txt::TextDirection ToTxtType(ImpellerTextDirection direction) {
477  switch (direction) {
479  return txt::TextDirection::rtl;
481  return txt::TextDirection::ltr;
482  }
483  return txt::TextDirection::ltr;
484 }
485 
486 } // namespace impeller::interop
487 
488 #endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_FORMATS_H_
ImpellerPoint
Definition: impeller.h:241
kImpellerBlendModeColorBurn
@ kImpellerBlendModeColorBurn
Definition: impeller.h:141
impeller.h
impeller::Matrix::m
Scalar m[16]
Definition: matrix.h:39
ImpellerISize::height
int64_t height
Definition: impeller.h:253
impeller::interop::ToDisplayListType
constexpr flutter::DlColor ToDisplayListType(Color color)
Definition: formats.h:73
kImpellerStrokeCapSquare
@ kImpellerStrokeCapSquare
Definition: impeller.h:162
kImpellerBlendModeExclusion
@ kImpellerBlendModeExclusion
Definition: impeller.h:145
ImpellerBlurStyle
ImpellerBlurStyle
Definition: impeller.h:187
ImpellerFontStyle
ImpellerFontStyle
Definition: impeller.h:212
kImpellerTextAlignmentLeft
@ kImpellerTextAlignmentLeft
Definition: impeller.h:218
impeller::BlendMode::kDestinationATop
@ kDestinationATop
kImpellerBlendModeColor
@ kImpellerBlendModeColor
Definition: impeller.h:149
point.h
kImpellerTextAlignmentRight
@ kImpellerTextAlignmentRight
Definition: impeller.h:219
impeller::TPoint::y
Type y
Definition: point.h:31
ImpellerMatrix::m
float m[16]
Definition: impeller.h:257
ImpellerRoundingRadii::top_right
ImpellerPoint top_right
Definition: impeller.h:267
kImpellerStrokeJoinRound
@ kImpellerStrokeJoinRound
Definition: impeller.h:167
ImpellerPoint::y
float y
Definition: impeller.h:243
kImpellerBlendModeDestinationOver
@ kImpellerBlendModeDestinationOver
Definition: impeller.h:126
kImpellerTextAlignmentEnd
@ kImpellerTextAlignmentEnd
Definition: impeller.h:223
entity.h
impeller::FillType::kOdd
@ kOdd
impeller::interop::FromImpellerType
constexpr void FromImpellerType(const Matrix &from, ImpellerMatrix &to)
Definition: formats.h:206
ImpellerClipOperation
ImpellerClipOperation
Definition: impeller.h:116
impeller::TRect< Scalar >::MakeXYWH
constexpr static TRect MakeXYWH(Type x, Type y, Type width, Type height)
Definition: rect.h:136
impeller::BlendMode
BlendMode
Definition: color.h:58
kImpellerBlendModeDestinationOut
@ kImpellerBlendModeDestinationOut
Definition: impeller.h:130
impeller::Color
Definition: color.h:123
kImpellerBlendModeHardLight
@ kImpellerBlendModeHardLight
Definition: impeller.h:142
kImpellerFontStyleNormal
@ kImpellerFontStyleNormal
Definition: impeller.h:213
ImpellerISize
Definition: impeller.h:251
impeller::BlendMode::kLuminosity
@ kLuminosity
kImpellerBlendModeDifference
@ kImpellerBlendModeDifference
Definition: impeller.h:144
impeller::BlendMode::kSource
@ kSource
impeller::PixelFormat::kR8G8B8A8UNormInt
@ kR8G8B8A8UNormInt
impeller::BlendMode::kColorDodge
@ kColorDodge
impeller::BlendMode::kDestination
@ kDestination
kImpellerTextAlignmentStart
@ kImpellerTextAlignmentStart
Definition: impeller.h:222
impeller::BlendMode::kDarken
@ kDarken
ImpellerColor
Definition: impeller.h:271
kImpellerColorSpaceDisplayP3
@ kImpellerColorSpaceDisplayP3
Definition: impeller.h:197
impeller::BlendMode::kColor
@ kColor
path_builder.h
ImpellerRect
Definition: impeller.h:234
impeller::Color::alpha
Scalar alpha
Definition: color.h:142
impeller::BlendMode::kDestinationOver
@ kDestinationOver
impeller::BlendMode::kPlus
@ kPlus
kImpellerFontWeight900
@ kImpellerFontWeight900
Definition: impeller.h:209
impeller::BlendMode::kOverlay
@ kOverlay
kImpellerBlurStyleOuter
@ kImpellerBlurStyleOuter
Definition: impeller.h:190
ImpellerTileMode
ImpellerTileMode
Definition: impeller.h:180
kImpellerFontWeight600
@ kImpellerFontWeight600
Definition: impeller.h:206
impeller::TRect::GetX
constexpr Type GetX() const
Returns the X coordinate of the upper left corner, equivalent to |GetOrigin().x|.
Definition: rect.h:327
kImpellerTileModeDecal
@ kImpellerTileModeDecal
Definition: impeller.h:184
ImpellerSize::height
float height
Definition: impeller.h:248
impeller::TRect::GetHeight
constexpr Type GetHeight() const
Returns the height of the rectangle, equivalent to |GetSize().height|.
Definition: rect.h:341
kImpellerFontWeight300
@ kImpellerFontWeight300
Definition: impeller.h:203
impeller::interop
Definition: color_filter.cc:7
impeller::Color::green
Scalar green
Definition: color.h:132
kImpellerBlurStyleInner
@ kImpellerBlurStyleInner
Definition: impeller.h:191
impeller::BlendMode::kModulate
@ kModulate
impeller::PathBuilder::RoundingRadii::bottom_right
Point bottom_right
Definition: path_builder.h:109
kImpellerBlurStyleSolid
@ kImpellerBlurStyleSolid
Definition: impeller.h:189
ImpellerStrokeCap
ImpellerStrokeCap
Definition: impeller.h:159
impeller::BlendMode::kSourceOut
@ kSourceOut
impeller::PixelFormat
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
Definition: formats.h:99
impeller::BlendMode::kSaturation
@ kSaturation
impeller::BlendMode::kDifference
@ kDifference
kImpellerBlendModeSoftLight
@ kImpellerBlendModeSoftLight
Definition: impeller.h:143
impeller::PathBuilder::RoundingRadii
Definition: path_builder.h:105
matrix.h
impeller::BlendMode::kLighten
@ kLighten
kImpellerBlendModeHue
@ kImpellerBlendModeHue
Definition: impeller.h:147
impeller::TSize< Scalar >
impeller::BlendMode::kSoftLight
@ kSoftLight
kImpellerBlendModeSourceOver
@ kImpellerBlendModeSourceOver
Definition: impeller.h:125
ImpellerMatrix
Definition: impeller.h:256
kImpellerFillTypeOdd
@ kImpellerFillTypeOdd
Definition: impeller.h:113
impeller::BlendMode::kColorBurn
@ kColorBurn
kImpellerClipOperationDifference
@ kImpellerClipOperationDifference
Definition: impeller.h:117
impeller::interop::ToTxtType
constexpr txt::FontWeight ToTxtType(ImpellerFontWeight weight)
Definition: formats.h:424
kImpellerTextDirectionRTL
@ kImpellerTextDirectionRTL
Definition: impeller.h:227
impeller::BlendMode::kHardLight
@ kHardLight
impeller::interop::ToSkiaType
constexpr std::optional< SkRect > ToSkiaType(const ImpellerRect *rect)
Definition: formats.h:26
ImpellerPixelFormat
ImpellerPixelFormat
Definition: impeller.h:171
ImpellerRoundingRadii
Definition: impeller.h:264
kImpellerBlendModePlus
@ kImpellerBlendModePlus
Definition: impeller.h:134
impeller::BlendMode::kClear
@ kClear
kImpellerPixelFormatRGBA8888
@ kImpellerPixelFormatRGBA8888
Definition: impeller.h:172
kImpellerClipOperationIntersect
@ kImpellerClipOperationIntersect
Definition: impeller.h:118
impeller::TRect::GetWidth
constexpr Type GetWidth() const
Returns the width of the rectangle, equivalent to |GetSize().width|.
Definition: rect.h:335
kImpellerBlendModeOverlay
@ kImpellerBlendModeOverlay
Definition: impeller.h:137
impeller::Color::red
Scalar red
Definition: color.h:127
kImpellerBlendModeSourceATop
@ kImpellerBlendModeSourceATop
Definition: impeller.h:131
type
GLenum type
Definition: blit_command_gles.cc:127
kImpellerBlendModeSourceOut
@ kImpellerBlendModeSourceOut
Definition: impeller.h:129
kImpellerDrawStyleStroke
@ kImpellerDrawStyleStroke
Definition: impeller.h:155
kImpellerFontWeight100
@ kImpellerFontWeight100
Definition: impeller.h:201
impeller::PathBuilder::RoundingRadii::top_left
Point top_left
Definition: path_builder.h:106
kImpellerFontWeight700
@ kImpellerFontWeight700
Definition: impeller.h:207
ImpellerStrokeJoin
ImpellerStrokeJoin
Definition: impeller.h:165
kImpellerBlendModeSource
@ kImpellerBlendModeSource
Definition: impeller.h:123
kImpellerBlendModeDestinationATop
@ kImpellerBlendModeDestinationATop
Definition: impeller.h:132
kImpellerBlendModeMultiply
@ kImpellerBlendModeMultiply
Definition: impeller.h:146
impeller::FillType
FillType
Definition: path.h:30
kImpellerTextAlignmentJustify
@ kImpellerTextAlignmentJustify
Definition: impeller.h:221
ImpellerDrawStyle
ImpellerDrawStyle
Definition: impeller.h:153
ImpellerRect::width
float width
Definition: impeller.h:237
ImpellerBlendMode
ImpellerBlendMode
Definition: impeller.h:121
ImpellerPoint::x
float x
Definition: impeller.h:242
kImpellerFontWeight500
@ kImpellerFontWeight500
Definition: impeller.h:205
kImpellerBlendModeDarken
@ kImpellerBlendModeDarken
Definition: impeller.h:138
kImpellerStrokeJoinBevel
@ kImpellerStrokeJoinBevel
Definition: impeller.h:168
ImpellerSize::width
float width
Definition: impeller.h:247
ImpellerRoundingRadii::bottom_left
ImpellerPoint bottom_left
Definition: impeller.h:266
impeller::interop::ToImpellerType
constexpr Matrix ToImpellerType(const ImpellerMatrix &m)
Definition: formats.h:198
kImpellerTileModeMirror
@ kImpellerTileModeMirror
Definition: impeller.h:183
kImpellerBlendModeDestination
@ kImpellerBlendModeDestination
Definition: impeller.h:124
impeller::FillType::kNonZero
@ kNonZero
ImpellerRoundingRadii::top_left
ImpellerPoint top_left
Definition: impeller.h:265
impeller::TPoint::x
Type x
Definition: point.h:30
kImpellerBlendModeDestinationIn
@ kImpellerBlendModeDestinationIn
Definition: impeller.h:128
kImpellerFontWeight800
@ kImpellerFontWeight800
Definition: impeller.h:208
ImpellerRect::y
float y
Definition: impeller.h:236
impeller::BlendMode::kDestinationIn
@ kDestinationIn
impeller::BlendMode::kExclusion
@ kExclusion
impeller::BlendMode::kDestinationOut
@ kDestinationOut
kImpellerBlendModeScreen
@ kImpellerBlendModeScreen
Definition: impeller.h:136
kImpellerStrokeCapRound
@ kImpellerStrokeCapRound
Definition: impeller.h:161
ImpellerTextDirection
ImpellerTextDirection
Definition: impeller.h:226
kImpellerBlendModeLighten
@ kImpellerBlendModeLighten
Definition: impeller.h:139
kImpellerTileModeClamp
@ kImpellerTileModeClamp
Definition: impeller.h:181
kImpellerBlendModeModulate
@ kImpellerBlendModeModulate
Definition: impeller.h:135
ImpellerTextureSampling
ImpellerTextureSampling
Definition: impeller.h:175
impeller::PathBuilder::RoundingRadii::top_right
Point top_right
Definition: path_builder.h:108
ImpellerRect::height
float height
Definition: impeller.h:238
kImpellerBlendModeClear
@ kImpellerBlendModeClear
Definition: impeller.h:122
kImpellerFontWeight200
@ kImpellerFontWeight200
Definition: impeller.h:202
rect.h
kImpellerFontStyleItalic
@ kImpellerFontStyleItalic
Definition: impeller.h:214
impeller::TPoint
Definition: point.h:27
kImpellerStrokeJoinMiter
@ kImpellerStrokeJoinMiter
Definition: impeller.h:166
kImpellerTextureSamplingLinear
@ kImpellerTextureSamplingLinear
Definition: impeller.h:177
kImpellerFillTypeNonZero
@ kImpellerFillTypeNonZero
Definition: impeller.h:112
impeller::PathBuilder::RoundingRadii::bottom_left
Point bottom_left
Definition: path_builder.h:107
impeller::BlendMode::kSourceIn
@ kSourceIn
impeller::BlendMode::kScreen
@ kScreen
ImpellerFillType
ImpellerFillType
Definition: impeller.h:111
ImpellerSize
Definition: impeller.h:246
color.h
kImpellerTileModeRepeat
@ kImpellerTileModeRepeat
Definition: impeller.h:182
color
DlColor color
Definition: dl_golden_blur_unittests.cc:24
kImpellerColorSpaceExtendedSRGB
@ kImpellerColorSpaceExtendedSRGB
Definition: impeller.h:196
kImpellerBlendModeXor
@ kImpellerBlendModeXor
Definition: impeller.h:133
ImpellerFontWeight
ImpellerFontWeight
Definition: impeller.h:200
impeller::BlendMode::kHue
@ kHue
kImpellerFontWeight400
@ kImpellerFontWeight400
Definition: impeller.h:204
ImpellerRect::x
float x
Definition: impeller.h:235
ImpellerISize::width
int64_t width
Definition: impeller.h:252
impeller::BlendMode::kXor
@ kXor
kImpellerBlendModeColorDodge
@ kImpellerBlendModeColorDodge
Definition: impeller.h:140
kImpellerBlendModeSourceIn
@ kImpellerBlendModeSourceIn
Definition: impeller.h:127
impeller::Color::blue
Scalar blue
Definition: color.h:137
kImpellerStrokeCapButt
@ kImpellerStrokeCapButt
Definition: impeller.h:160
impeller::TSize::MakeWH
static constexpr TSize MakeWH(Type width, Type height)
Definition: size.h:34
kImpellerBlendModeLuminosity
@ kImpellerBlendModeLuminosity
Definition: impeller.h:150
impeller::interop::ToSkMatrix
constexpr SkMatrix ToSkMatrix(const Matrix &matrix)
Definition: formats.h:81
kImpellerTextAlignmentCenter
@ kImpellerTextAlignmentCenter
Definition: impeller.h:220
ImpellerColorSpace
ImpellerColorSpace
Definition: impeller.h:194
impeller::TRect::GetY
constexpr Type GetY() const
Returns the Y coordinate of the upper left corner, equivalent to |GetOrigin().y|.
Definition: rect.h:331
impeller::BlendMode::kSourceATop
@ kSourceATop
impeller::BlendMode::kMultiply
@ kMultiply
kImpellerDrawStyleFill
@ kImpellerDrawStyleFill
Definition: impeller.h:154
kImpellerBlurStyleNormal
@ kImpellerBlurStyleNormal
Definition: impeller.h:188
ImpellerTextAlignment
ImpellerTextAlignment
Definition: impeller.h:217
kImpellerColorSpaceSRGB
@ kImpellerColorSpaceSRGB
Definition: impeller.h:195
impeller::TRect< Scalar >
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37
kImpellerBlendModeSaturation
@ kImpellerBlendModeSaturation
Definition: impeller.h:148
size.h
impeller::BlendMode::kSourceOver
@ kSourceOver
kImpellerTextDirectionLTR
@ kImpellerTextDirectionLTR
Definition: impeller.h:228
ImpellerRoundingRadii::bottom_right
ImpellerPoint bottom_right
Definition: impeller.h:268
kImpellerTextureSamplingNearestNeighbor
@ kImpellerTextureSamplingNearestNeighbor
Definition: impeller.h:176
kImpellerDrawStyleStrokeAndFill
@ kImpellerDrawStyleStrokeAndFill
Definition: impeller.h:156