Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
SkSVGPaint Class Reference

#include <SkSVGTypes.h>

Public Types

enum class  Type { kNone , kColor , kIRI }
 

Public Member Functions

 SkSVGPaint ()
 
 SkSVGPaint (Type t)
 
 SkSVGPaint (SkSVGColor c)
 
 SkSVGPaint (const SkSVGIRI &iri, SkSVGColor fallback_color)
 
 SkSVGPaint (const SkSVGPaint &)=default
 
SkSVGPaintoperator= (const SkSVGPaint &)=default
 
 SkSVGPaint (SkSVGPaint &&)=default
 
SkSVGPaintoperator= (SkSVGPaint &&)=default
 
bool operator== (const SkSVGPaint &other) const
 
bool operator!= (const SkSVGPaint &other) const
 
Type type () const
 
const SkSVGColorcolor () const
 
const SkSVGIRIiri () const
 

Detailed Description

Definition at line 224 of file SkSVGTypes.h.

Member Enumeration Documentation

◆ Type

enum class SkSVGPaint::Type
strong
Enumerator
kNone 
kColor 
kIRI 

Definition at line 226 of file SkSVGTypes.h.

226 {
227 kNone,
228 kColor,
229 kIRI,
230 };

Constructor & Destructor Documentation

◆ SkSVGPaint() [1/6]

SkSVGPaint::SkSVGPaint ( )
inline

Definition at line 232 of file SkSVGTypes.h.

232: fType(Type::kNone), fColor(SK_ColorBLACK) {}
constexpr SkColor SK_ColorBLACK
Definition SkColor.h:103

◆ SkSVGPaint() [2/6]

SkSVGPaint::SkSVGPaint ( Type  t)
inlineexplicit

Definition at line 233 of file SkSVGTypes.h.

233: fType(t), fColor(SK_ColorBLACK) {}

◆ SkSVGPaint() [3/6]

SkSVGPaint::SkSVGPaint ( SkSVGColor  c)
inlineexplicit

Definition at line 234 of file SkSVGTypes.h.

234: fType(Type::kColor), fColor(std::move(c)) {}

◆ SkSVGPaint() [4/6]

SkSVGPaint::SkSVGPaint ( const SkSVGIRI iri,
SkSVGColor  fallback_color 
)
inline

Definition at line 235 of file SkSVGTypes.h.

236 : fType(Type::kIRI), fColor(std::move(fallback_color)), fIRI(iri) {}
const SkSVGIRI & iri() const
Definition SkSVGTypes.h:253

◆ SkSVGPaint() [5/6]

SkSVGPaint::SkSVGPaint ( const SkSVGPaint )
default

◆ SkSVGPaint() [6/6]

SkSVGPaint::SkSVGPaint ( SkSVGPaint &&  )
default

Member Function Documentation

◆ color()

const SkSVGColor & SkSVGPaint::color ( ) const
inline

Definition at line 249 of file SkSVGTypes.h.

249 {
250 SkASSERT(fType == Type::kColor || fType == Type::kIRI);
251 return fColor;
252 }
#define SkASSERT(cond)
Definition SkAssert.h:116

◆ iri()

const SkSVGIRI & SkSVGPaint::iri ( ) const
inline

Definition at line 253 of file SkSVGTypes.h.

253{ SkASSERT(fType == Type::kIRI); return fIRI; }

◆ operator!=()

bool SkSVGPaint::operator!= ( const SkSVGPaint other) const
inline

Definition at line 246 of file SkSVGTypes.h.

246{ return !(*this == other); }

◆ operator=() [1/2]

SkSVGPaint & SkSVGPaint::operator= ( const SkSVGPaint )
default

◆ operator=() [2/2]

SkSVGPaint & SkSVGPaint::operator= ( SkSVGPaint &&  )
default

◆ operator==()

bool SkSVGPaint::operator== ( const SkSVGPaint other) const
inline

Definition at line 243 of file SkSVGTypes.h.

243 {
244 return fType == other.fType && fColor == other.fColor && fIRI == other.fIRI;
245 }

◆ type()

Type SkSVGPaint::type ( ) const
inline

Definition at line 248 of file SkSVGTypes.h.

248{ return fType; }

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