Flutter Engine
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)
 
const MutatorTypeGetType () const
 
const SkRect & GetRect () const
 
const SkRRect & GetRRect () const
 
const SkPath & GetPath () const
 
const SkMatrix & GetMatrix () const
 
const int & GetAlpha () const
 
float GetAlphaFloat () const
 
bool operator== (const Mutator &other) const
 
bool operator!= (const Mutator &other) const
 
bool IsClipType ()
 
 ~Mutator ()
 

Detailed Description

Definition at line 32 of file embedded_views.h.

Constructor & Destructor Documentation

◆ Mutator() [1/6]

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

Definition at line 34 of file embedded_views.h.

References alpha_, flutter::clip_path, flutter::clip_rect, flutter::clip_rrect, matrix_, flutter::opacity, path_, rect_, rrect_, and flutter::transform.

34  {
35  type_ = other.type_;
36  switch (other.type_) {
37  case clip_rect:
38  rect_ = other.rect_;
39  break;
40  case clip_rrect:
41  rrect_ = other.rrect_;
42  break;
43  case clip_path:
44  path_ = new SkPath(*other.path_);
45  break;
46  case transform:
47  matrix_ = other.matrix_;
48  break;
49  case opacity:
50  alpha_ = other.alpha_;
51  break;
52  default:
53  break;
54  }
55  }

◆ Mutator() [2/6]

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

Definition at line 57 of file embedded_views.h.

57 : type_(clip_rect), rect_(rect) {}

◆ Mutator() [3/6]

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

Definition at line 58 of file embedded_views.h.

58 : type_(clip_rrect), rrect_(rrect) {}

◆ Mutator() [4/6]

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

Definition at line 59 of file embedded_views.h.

60  : type_(clip_path), 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/6]

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

Definition at line 61 of file embedded_views.h.

62  : type_(transform), matrix_(matrix) {}

◆ Mutator() [6/6]

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

Definition at line 63 of file embedded_views.h.

63 : type_(opacity), alpha_(alpha) {}

◆ ~Mutator()

flutter::Mutator::~Mutator ( )
inline

Definition at line 99 of file embedded_views.h.

References flutter::clip_path, and path_.

99  {
100  if (type_ == clip_path) {
101  delete path_;
102  }
103  };

Member Function Documentation

◆ GetAlpha()

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

Definition at line 70 of file embedded_views.h.

References alpha_.

70 { return alpha_; }

◆ GetAlphaFloat()

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

Definition at line 71 of file embedded_views.h.

References alpha_.

71 { return (alpha_ / 255.0); }

◆ GetMatrix()

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

Definition at line 69 of file embedded_views.h.

References matrix_.

Referenced by flutter::testing::TEST().

69 { return matrix_; }

◆ GetPath()

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

Definition at line 68 of file embedded_views.h.

References path_.

Referenced by flutter::testing::TEST().

68 { return *path_; }

◆ GetRect()

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

Definition at line 66 of file embedded_views.h.

References rect_.

Referenced by flutter::testing::TEST().

66 { return rect_; }

◆ GetRRect()

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

Definition at line 67 of file embedded_views.h.

References rrect_.

Referenced by flutter::testing::TEST().

67 { return rrect_; }

◆ GetType()

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

Definition at line 65 of file embedded_views.h.

Referenced by flutter::testing::TEST().

65 { return type_; }

◆ IsClipType()

bool flutter::Mutator::IsClipType ( )
inline

Definition at line 95 of file embedded_views.h.

References flutter::clip_path, flutter::clip_rect, and flutter::clip_rrect.

95  {
96  return type_ == clip_rect || type_ == clip_rrect || type_ == clip_path;
97  }

◆ operator!=()

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

Definition at line 93 of file embedded_views.h.

References operator==().

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

◆ operator==()

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

Definition at line 73 of file embedded_views.h.

References alpha_, flutter::clip_path, flutter::clip_rect, flutter::clip_rrect, matrix_, flutter::opacity, path_, rect_, rrect_, and flutter::transform.

Referenced by operator!=(), and flutter::MutatorsStack::operator!=().

73  {
74  if (type_ != other.type_) {
75  return false;
76  }
77  switch (type_) {
78  case clip_rect:
79  return rect_ == other.rect_;
80  case clip_rrect:
81  return rrect_ == other.rrect_;
82  case clip_path:
83  return *path_ == *other.path_;
84  case transform:
85  return matrix_ == other.matrix_;
86  case opacity:
87  return alpha_ == other.alpha_;
88  }
89 
90  return false;
91  }

Member Data Documentation

◆ alpha_

int flutter::Mutator::alpha_

Definition at line 113 of file embedded_views.h.

Referenced by GetAlpha(), GetAlphaFloat(), Mutator(), and operator==().

◆ matrix_

SkMatrix flutter::Mutator::matrix_

◆ path_

SkPath* flutter::Mutator::path_

Definition at line 112 of file embedded_views.h.

Referenced by GetPath(), Mutator(), operator==(), and ~Mutator().

◆ rect_

SkRect flutter::Mutator::rect_

Definition at line 109 of file embedded_views.h.

Referenced by GetRect(), Mutator(), and operator==().

◆ rrect_

SkRRect flutter::Mutator::rrect_

Definition at line 110 of file embedded_views.h.

Referenced by GetRRect(), Mutator(), and operator==().


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