Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::Mutator Class Reference

#include <embedded_views.h>

Public Member Functions

 Mutator (const Mutator &other)
 
 Mutator (const SkRect &rect)
 
 Mutator (const SkRRect &rrect)
 
 Mutator (const SkPath &path)
 
 Mutator (const SkMatrix &matrix)
 
 Mutator (const int &alpha)
 
 Mutator (const std::shared_ptr< const DlImageFilter > &filter, const SkRect &filter_rect)
 
const MutatorTypeGetType () const
 
const SkRectGetRect () const
 
const SkRRectGetRRect () const
 
const SkPathGetPath () const
 
const SkMatrixGetMatrix () const
 
const ImageFilterMutationGetFilterMutation () const
 
const intGetAlpha () const
 
float GetAlphaFloat () const
 
bool operator== (const Mutator &other) const
 
bool operator!= (const Mutator &other) const
 
bool IsClipType ()
 
 ~Mutator ()
 

Detailed Description

Definition at line 79 of file embedded_views.h.

Constructor & Destructor Documentation

◆ Mutator() [1/7]

flutter::Mutator::Mutator ( const Mutator other)
inline

Definition at line 81 of file embedded_views.h.

81 {
82 type_ = other.type_;
83 switch (other.type_) {
84 case kClipRect:
85 rect_ = other.rect_;
86 break;
87 case kClipRRect:
88 rrect_ = other.rrect_;
89 break;
90 case kClipPath:
91 path_ = new SkPath(*other.path_);
92 break;
93 case kTransform:
94 matrix_ = other.matrix_;
95 break;
96 case kOpacity:
97 alpha_ = other.alpha_;
98 break;
99 case kBackdropFilter:
100 filter_mutation_ = other.filter_mutation_;
101 break;
102 default:
103 break;
104 }
105 }
Definition: SkPath.h:59
@ kBackdropFilter

◆ Mutator() [2/7]

flutter::Mutator::Mutator ( const SkRect rect)
inlineexplicit

Definition at line 107 of file embedded_views.h.

107: type_(kClipRect), rect_(rect) {}
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350

◆ Mutator() [3/7]

flutter::Mutator::Mutator ( const SkRRect rrect)
inlineexplicit

Definition at line 108 of file embedded_views.h.

108: type_(kClipRRect), rrect_(rrect) {}
SkRRect rrect
Definition: SkRecords.h:232

◆ Mutator() [4/7]

flutter::Mutator::Mutator ( const SkPath path)
inlineexplicit

Definition at line 109 of file embedded_views.h.

110 : type_(kClipPath), path_(new SkPath(path)) {}
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

◆ Mutator() [5/7]

flutter::Mutator::Mutator ( const SkMatrix matrix)
inlineexplicit

Definition at line 111 of file embedded_views.h.

112 : type_(kTransform), matrix_(matrix) {}
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258

◆ Mutator() [6/7]

flutter::Mutator::Mutator ( const int alpha)
inlineexplicit

Definition at line 113 of file embedded_views.h.

113: type_(kOpacity), alpha_(alpha) {}

◆ Mutator() [7/7]

flutter::Mutator::Mutator ( const std::shared_ptr< const DlImageFilter > &  filter,
const SkRect filter_rect 
)
inlineexplicit

Definition at line 114 of file embedded_views.h.

116 : type_(kBackdropFilter),
117 filter_mutation_(
118 std::make_shared<ImageFilterMutation>(filter, filter_rect)) {}

◆ ~Mutator()

flutter::Mutator::~Mutator ( )
inline

Definition at line 159 of file embedded_views.h.

159 {
160 if (type_ == kClipPath) {
161 delete path_;
162 }
163 };

Member Function Documentation

◆ GetAlpha()

const int & flutter::Mutator::GetAlpha ( ) const
inline

Definition at line 128 of file embedded_views.h.

128{ return alpha_; }

◆ GetAlphaFloat()

float flutter::Mutator::GetAlphaFloat ( ) const
inline

Definition at line 129 of file embedded_views.h.

129{ return (alpha_ / 255.0f); }

◆ GetFilterMutation()

const ImageFilterMutation & flutter::Mutator::GetFilterMutation ( ) const
inline

Definition at line 125 of file embedded_views.h.

125 {
126 return *filter_mutation_;
127 }

◆ GetMatrix()

const SkMatrix & flutter::Mutator::GetMatrix ( ) const
inline

Definition at line 124 of file embedded_views.h.

124{ return matrix_; }

◆ GetPath()

const SkPath & flutter::Mutator::GetPath ( ) const
inline

Definition at line 123 of file embedded_views.h.

123{ return *path_; }

◆ GetRect()

const SkRect & flutter::Mutator::GetRect ( ) const
inline

Definition at line 121 of file embedded_views.h.

121{ return rect_; }

◆ GetRRect()

const SkRRect & flutter::Mutator::GetRRect ( ) const
inline

Definition at line 122 of file embedded_views.h.

122{ return rrect_; }

◆ GetType()

const MutatorType & flutter::Mutator::GetType ( ) const
inline

Definition at line 120 of file embedded_views.h.

120{ return type_; }

◆ IsClipType()

bool flutter::Mutator::IsClipType ( )
inline

Definition at line 155 of file embedded_views.h.

155 {
156 return type_ == kClipRect || type_ == kClipRRect || type_ == kClipPath;
157 }

◆ operator!=()

bool flutter::Mutator::operator!= ( const Mutator other) const
inline

Definition at line 153 of file embedded_views.h.

153{ return !operator==(other); }
bool operator==(const Mutator &other) const

◆ operator==()

bool flutter::Mutator::operator== ( const Mutator other) const
inline

Definition at line 131 of file embedded_views.h.

131 {
132 if (type_ != other.type_) {
133 return false;
134 }
135 switch (type_) {
136 case kClipRect:
137 return rect_ == other.rect_;
138 case kClipRRect:
139 return rrect_ == other.rrect_;
140 case kClipPath:
141 return *path_ == *other.path_;
142 case kTransform:
143 return matrix_ == other.matrix_;
144 case kOpacity:
145 return alpha_ == other.alpha_;
146 case kBackdropFilter:
147 return *filter_mutation_ == *other.filter_mutation_;
148 }
149
150 return false;
151 }

Member Data Documentation

◆ alpha_

int flutter::Mutator::alpha_

Definition at line 175 of file embedded_views.h.

◆ matrix_

SkMatrix flutter::Mutator::matrix_

Definition at line 173 of file embedded_views.h.

◆ path_

SkPath* flutter::Mutator::path_

Definition at line 174 of file embedded_views.h.

◆ rect_

SkRect flutter::Mutator::rect_

Definition at line 171 of file embedded_views.h.

◆ rrect_

SkRRect flutter::Mutator::rrect_

Definition at line 172 of file embedded_views.h.


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