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

#include <SkSVGTypes.h>

Public Types

enum class  Unit {
  kUnknown , kNumber , kPercentage , kEMS ,
  kEXS , kPX , kCM , kMM ,
  kIN , kPT , kPC
}
 

Public Member Functions

constexpr SkSVGLength ()
 
constexpr SkSVGLength (SkScalar v, Unit u=Unit::kNumber)
 
 SkSVGLength (const SkSVGLength &)=default
 
SkSVGLengthoperator= (const SkSVGLength &)=default
 
bool operator== (const SkSVGLength &other) const
 
bool operator!= (const SkSVGLength &other) const
 
const SkScalarvalue () const
 
const Unitunit () const
 

Detailed Description

Definition at line 116 of file SkSVGTypes.h.

Member Enumeration Documentation

◆ Unit

enum class SkSVGLength::Unit
strong
Enumerator
kUnknown 
kNumber 
kPercentage 
kEMS 
kEXS 
kPX 
kCM 
kMM 
kIN 
kPT 
kPC 

Definition at line 118 of file SkSVGTypes.h.

Constructor & Destructor Documentation

◆ SkSVGLength() [1/3]

constexpr SkSVGLength::SkSVGLength ( )
inlineconstexpr

Definition at line 132 of file SkSVGTypes.h.

132: fValue(0), fUnit(Unit::kUnknown) {}

◆ SkSVGLength() [2/3]

constexpr SkSVGLength::SkSVGLength ( SkScalar  v,
Unit  u = Unit::kNumber 
)
inlineexplicitconstexpr

Definition at line 133 of file SkSVGTypes.h.

134 : fValue(v), fUnit(u) {}

◆ SkSVGLength() [3/3]

SkSVGLength::SkSVGLength ( const SkSVGLength )
default

Member Function Documentation

◆ operator!=()

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

Definition at line 141 of file SkSVGTypes.h.

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

◆ operator=()

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

◆ operator==()

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

Definition at line 138 of file SkSVGTypes.h.

138 {
139 return fUnit == other.fUnit && fValue == other.fValue;
140 }

◆ unit()

const Unit & SkSVGLength::unit ( ) const
inline

Definition at line 144 of file SkSVGTypes.h.

144{ return fUnit; }

◆ value()

const SkScalar & SkSVGLength::value ( ) const
inline

Definition at line 143 of file SkSVGTypes.h.

143{ return fValue; }

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