Flutter Engine
The Flutter Engine
Classes | Public Types | Public Member Functions | List of all members
SkSVGColor Class Reference

#include <SkSVGTypes.h>

Public Types

enum class  Type { kCurrentColor , kColor , kICCColor }
 
using Vars = std::vector< SkString >
 

Public Member Functions

 SkSVGColor ()
 
 SkSVGColor (const SkSVGColorType &c)
 
 SkSVGColor (Type t, Vars &&vars)
 
 SkSVGColor (const SkSVGColorType &c, Vars &&vars)
 
 SkSVGColor (const SkSVGColor &)=default
 
SkSVGColoroperator= (const SkSVGColor &)=default
 
 SkSVGColor (SkSVGColor &&)=default
 
SkSVGColoroperator= (SkSVGColor &&)=default
 
bool operator== (const SkSVGColor &other) const
 
bool operator!= (const SkSVGColor &other) const
 
Type type () const
 
const SkSVGColorTypecolor () const
 
SkSpan< const SkStringvars () const
 
SkSpan< SkStringvars ()
 

Detailed Description

Definition at line 177 of file SkSVGTypes.h.

Member Typedef Documentation

◆ Vars

using SkSVGColor::Vars = std::vector<SkString>

Definition at line 184 of file SkSVGTypes.h.

Member Enumeration Documentation

◆ Type

enum class SkSVGColor::Type
strong
Enumerator
kCurrentColor 
kColor 
kICCColor 

Definition at line 179 of file SkSVGTypes.h.

179 {
180 kCurrentColor,
181 kColor,
182 kICCColor,
183 };
@ kColor
hue and saturation of source with luminosity of destination

Constructor & Destructor Documentation

◆ SkSVGColor() [1/6]

SkSVGColor::SkSVGColor ( )
inline

Definition at line 186 of file SkSVGTypes.h.

constexpr SkColor SK_ColorBLACK
Definition: SkColor.h:103

◆ SkSVGColor() [2/6]

SkSVGColor::SkSVGColor ( const SkSVGColorType c)
inlineexplicit

Definition at line 187 of file SkSVGTypes.h.

187: fType(Type::kColor), fColor(c), fVars(nullptr) {}

◆ SkSVGColor() [3/6]

SkSVGColor::SkSVGColor ( Type  t,
Vars &&  vars 
)
inlineexplicit

Definition at line 188 of file SkSVGTypes.h.

189 : fType(t), fColor(SK_ColorBLACK)
190 , fVars(vars.empty() ? nullptr : new RefCntVars(std::move(vars))) {}
Definition: __init__.py:1

◆ SkSVGColor() [4/6]

SkSVGColor::SkSVGColor ( const SkSVGColorType c,
Vars &&  vars 
)
inlineexplicit

Definition at line 191 of file SkSVGTypes.h.

192 : fType(Type::kColor), fColor(c)
193 , fVars(vars.empty() ? nullptr : new RefCntVars(std::move(vars))) {}

◆ SkSVGColor() [5/6]

SkSVGColor::SkSVGColor ( const SkSVGColor )
default

◆ SkSVGColor() [6/6]

SkSVGColor::SkSVGColor ( SkSVGColor &&  )
default

Member Function Documentation

◆ color()

const SkSVGColorType & SkSVGColor::color ( ) const
inline

Definition at line 206 of file SkSVGTypes.h.

206{ SkASSERT(fType == Type::kColor); return fColor; }
#define SkASSERT(cond)
Definition: SkAssert.h:116

◆ operator!=()

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

Definition at line 203 of file SkSVGTypes.h.

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

SkSVGColor & SkSVGColor::operator= ( SkSVGColor &&  )
default

◆ operator==()

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

Definition at line 200 of file SkSVGTypes.h.

200 {
201 return fType == other.fType && fColor == other.fColor && fVars == other.fVars;
202 }

◆ type()

Type SkSVGColor::type ( ) const
inline

Definition at line 205 of file SkSVGTypes.h.

205{ return fType; }

◆ vars() [1/2]

SkSpan< SkString > SkSVGColor::vars ( )
inline

Definition at line 210 of file SkSVGTypes.h.

210 {
211 return fVars ? SkSpan<SkString>(fVars->fData) : SkSpan<SkString>();
212 }

◆ vars() [2/2]

SkSpan< const SkString > SkSVGColor::vars ( ) const
inline

Definition at line 207 of file SkSVGTypes.h.

207 {
208 return fVars ? SkSpan<const SkString>(fVars->fData) : SkSpan<const SkString>();
209 }

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