Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
flutter::DisplayListAttributeFlags Class Reference

#include <dl_op_flags.h>

Inheritance diagram for flutter::DisplayListAttributeFlags:
flutter::DisplayListFlagsBase

Public Member Functions

const DisplayListSpecialGeometryFlags WithPathEffect (const DlPathEffect *effect, bool is_stroked) const
 
constexpr bool ignores_paint () const
 
constexpr bool applies_anti_alias () const
 
constexpr bool applies_color () const
 
constexpr bool applies_alpha () const
 
constexpr bool applies_alpha_or_color () const
 
constexpr bool applies_style () const
 
constexpr bool applies_shader () const
 
constexpr bool applies_color_filter () const
 
constexpr bool applies_blend () const
 The primitive honors the DlBlendMode.
 
constexpr bool applies_path_effect () const
 
constexpr bool applies_mask_filter () const
 
constexpr bool applies_image_filter () const
 
constexpr bool is_geometric () const
 
constexpr bool always_stroked () const
 
constexpr bool is_stroked (DlDrawStyle style=DlDrawStyle::kStroke) const
 
constexpr bool is_flood () const
 
constexpr bool operator== (DisplayListAttributeFlags const &other) const
 

Friends

class DisplayListOpFlags
 

Detailed Description

Definition at line 165 of file dl_op_flags.h.

Member Function Documentation

◆ always_stroked()

constexpr bool flutter::DisplayListAttributeFlags::always_stroked ( ) const
inlineconstexpr

Definition at line 214 of file dl_op_flags.h.

214{ return has_any(kIsStrokedGeometry); }
constexpr bool has_any(int qFlags) const
static constexpr int kIsStrokedGeometry
Definition dl_op_flags.h:37

◆ applies_alpha()

constexpr bool flutter::DisplayListAttributeFlags::applies_alpha ( ) const
inlineconstexpr

Definition at line 175 of file dl_op_flags.h.

175{ return has_any(kUsesAlpha); }
static constexpr int kUsesAlpha
Definition dl_op_flags.h:84

◆ applies_alpha_or_color()

constexpr bool flutter::DisplayListAttributeFlags::applies_alpha_or_color ( ) const
inlineconstexpr

Definition at line 176 of file dl_op_flags.h.

176 {
177 return has_any(kUsesAlpha | kUsesColor);
178 }
static constexpr int kUsesColor
Definition dl_op_flags.h:85

◆ applies_anti_alias()

constexpr bool flutter::DisplayListAttributeFlags::applies_anti_alias ( ) const
inlineconstexpr

Definition at line 173 of file dl_op_flags.h.

173{ return has_any(kUsesAntiAlias); }
static constexpr int kUsesAntiAlias
Definition dl_op_flags.h:83

◆ applies_blend()

constexpr bool flutter::DisplayListAttributeFlags::applies_blend ( ) const
inlineconstexpr

The primitive honors the DlBlendMode.

Definition at line 200 of file dl_op_flags.h.

200{ return has_any(kUsesBlend); }
static constexpr int kUsesBlend
Definition dl_op_flags.h:86

◆ applies_color()

constexpr bool flutter::DisplayListAttributeFlags::applies_color ( ) const
inlineconstexpr

Definition at line 174 of file dl_op_flags.h.

174{ return has_any(kUsesColor); }

◆ applies_color_filter()

constexpr bool flutter::DisplayListAttributeFlags::applies_color_filter ( ) const
inlineconstexpr

The primitive honors the current DlColorFilter, including the related attribute InvertColors

Definition at line 196 of file dl_op_flags.h.

196 {
198 }
static constexpr int kUsesColorFilter
Definition dl_op_flags.h:88

◆ applies_image_filter()

constexpr bool flutter::DisplayListAttributeFlags::applies_image_filter ( ) const
inlineconstexpr

Definition at line 209 of file dl_op_flags.h.

209 {
211 }
static constexpr int kUsesImageFilter
Definition dl_op_flags.h:91

◆ applies_mask_filter()

constexpr bool flutter::DisplayListAttributeFlags::applies_mask_filter ( ) const
inlineconstexpr

The primitive honors the DlMaskFilter whether set using the filter object or using the convenience method |setMaskBlurFilter|

Definition at line 206 of file dl_op_flags.h.

206 {
207 return has_any(kUsesMaskFilter);
208 }
static constexpr int kUsesMaskFilter
Definition dl_op_flags.h:90

◆ applies_path_effect()

constexpr bool flutter::DisplayListAttributeFlags::applies_path_effect ( ) const
inlineconstexpr

Definition at line 201 of file dl_op_flags.h.

201 {
202 return has_any(kUsesPathEffect);
203 }
static constexpr int kUsesPathEffect
Definition dl_op_flags.h:89

◆ applies_shader()

constexpr bool flutter::DisplayListAttributeFlags::applies_shader ( ) const
inlineconstexpr

The primitive can use any of the stroke attributes, such as StrokeWidth, StrokeMiter, StrokeCap, or StrokeJoin. This method will return if the primitive is defined as one that strokes its geometry (such as |drawLine|) or if it is defined as one that honors the Style attribute. If the Style attribute is known then a more accurate answer can be returned from the |is_stroked| method by supplying the actual setting of the style.

Definition at line 193 of file dl_op_flags.h.

193{ return has_any(kUsesShader); }
static constexpr int kUsesShader
Definition dl_op_flags.h:87

◆ applies_style()

constexpr bool flutter::DisplayListAttributeFlags::applies_style ( ) const
inlineconstexpr

The primitive dynamically determines whether it is a stroke or fill operation (or both) based on the setting of the |Style| attribute.

Definition at line 182 of file dl_op_flags.h.

182{ return has_any(kIsDrawnGeometry); }
static constexpr int kIsDrawnGeometry
Definition dl_op_flags.h:42

◆ ignores_paint()

constexpr bool flutter::DisplayListAttributeFlags::ignores_paint ( ) const
inlineconstexpr

Definition at line 171 of file dl_op_flags.h.

171{ return has_any(kIgnoresPaint); }
static constexpr int kIgnoresPaint

◆ is_flood()

constexpr bool flutter::DisplayListAttributeFlags::is_flood ( ) const
inlineconstexpr

Definition at line 220 of file dl_op_flags.h.

220{ return has_any(kFloodsSurface); }
static constexpr int kFloodsSurface
Definition dl_op_flags.h:51

◆ is_geometric()

constexpr bool flutter::DisplayListAttributeFlags::is_geometric ( ) const
inlineconstexpr

Definition at line 213 of file dl_op_flags.h.

213{ return has_any(kIsAnyGeometryMask); }
static constexpr int kIsAnyGeometryMask
Definition dl_op_flags.h:44

◆ is_stroked()

constexpr bool flutter::DisplayListAttributeFlags::is_stroked ( DlDrawStyle  style = DlDrawStyle::kStroke) const
inlineconstexpr

Definition at line 215 of file dl_op_flags.h.

215 {
216 return (has_any(kIsStrokedGeometry) ||
218 }
@ kFill
fills interior of shapes

◆ operator==()

constexpr bool flutter::DisplayListAttributeFlags::operator== ( DisplayListAttributeFlags const &  other) const
inlineconstexpr

Definition at line 222 of file dl_op_flags.h.

222 {
223 return flags_ == other.flags_;
224 }

◆ WithPathEffect()

const DisplayListSpecialGeometryFlags flutter::DisplayListAttributeFlags::WithPathEffect ( const DlPathEffect effect,
bool  is_stroked 
) const

Definition at line 10 of file dl_op_flags.cc.

12 {
13 if (is_geometric() && effect) {
14 switch (effect->type()) {
16 // Dashing has no effect on filled geometry.
17 if (is_stroked) {
18 // A dash effect has a very simple impact. It cannot introduce any
19 // miter joins that weren't already present in the original path
20 // and it does not grow the bounds of the path, but it can add
21 // end caps to areas that might not have had them before so all
22 // we need to do is to indicate the potential for diagonal
23 // end caps and move on.
24 return special_flags_.with(kMayHaveCaps | kMayHaveDiagonalCaps);
25 }
26 }
27 }
28 }
29 return special_flags_;
30}
constexpr bool is_stroked(DlDrawStyle style=DlDrawStyle::kStroke) const
constexpr bool is_geometric() const
static constexpr int kMayHaveDiagonalCaps
Definition dl_op_flags.h:65
static constexpr int kMayHaveCaps
Definition dl_op_flags.h:53

Friends And Related Symbol Documentation

◆ DisplayListOpFlags

friend class DisplayListOpFlags
friend

Definition at line 251 of file dl_op_flags.h.


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