Flutter Engine
The Flutter Engine
Public Member Functions | Friends | List of all members
skif::LayerSpace< Vector > Class Reference

#include <SkImageFilterTypes.h>

Public Member Functions

 LayerSpace ()=default
 
 LayerSpace (const Vector &geometry)
 
 LayerSpace (Vector &&geometry)
 
 operator const Vector & () const
 
 operator SkVector () const
 
SkScalar x () const
 
SkScalar y () const
 
SkScalar length () const
 
LayerSpace< Vectoroperator- () const
 
LayerSpace< Vectoroperator* (SkScalar s) const
 
LayerSpace< Vectoroperator+ (const LayerSpace< Vector > &v) const
 
LayerSpace< Vectoroperator- (const LayerSpace< Vector > &v) const
 
void operator*= (SkScalar s)
 
void operator+= (const LayerSpace< Vector > &v)
 
void operator-= (const LayerSpace< Vector > &v)
 

Friends

LayerSpace< Vectoroperator* (SkScalar s, const LayerSpace< Vector > &b)
 

Detailed Description

Definition at line 194 of file SkImageFilterTypes.h.

Constructor & Destructor Documentation

◆ LayerSpace() [1/3]

skif::LayerSpace< Vector >::LayerSpace ( )
default

◆ LayerSpace() [2/3]

skif::LayerSpace< Vector >::LayerSpace ( const Vector geometry)
inlineexplicit

Definition at line 197 of file SkImageFilterTypes.h.

197: fData(geometry) {}

◆ LayerSpace() [3/3]

skif::LayerSpace< Vector >::LayerSpace ( Vector &&  geometry)
inlineexplicit

Definition at line 198 of file SkImageFilterTypes.h.

198: fData(std::move(geometry)) {}

Member Function Documentation

◆ length()

SkScalar skif::LayerSpace< Vector >::length ( ) const
inline

Definition at line 206 of file SkImageFilterTypes.h.

206{ return SkVector::Length(fData.fX, fData.fY); }
static float Length(float x, float y)
Definition: SkPoint.cpp:79

◆ operator const Vector &()

skif::LayerSpace< Vector >::operator const Vector & ( ) const
inlineexplicit

Definition at line 199 of file SkImageFilterTypes.h.

199{ return fData; }

◆ operator SkVector()

skif::LayerSpace< Vector >::operator SkVector ( ) const
inlineexplicit

Definition at line 201 of file SkImageFilterTypes.h.

201{ return SkVector::Make(fData.fX, fData.fY); }
static constexpr SkPoint Make(float x, float y)
Definition: SkPoint_impl.h:173

◆ operator*()

LayerSpace< Vector > skif::LayerSpace< Vector >::operator* ( SkScalar  s) const
inline

Definition at line 210 of file SkImageFilterTypes.h.

210 {
211 LayerSpace<Vector> scaled = *this;
212 scaled *= s;
213 return scaled;
214 }
struct MyStruct s

◆ operator*=()

void skif::LayerSpace< Vector >::operator*= ( SkScalar  s)
inline

Definition at line 227 of file SkImageFilterTypes.h.

227 {
228 fData.fX *= s;
229 fData.fY *= s;
230 }

◆ operator+()

LayerSpace< Vector > skif::LayerSpace< Vector >::operator+ ( const LayerSpace< Vector > &  v) const
inline

Definition at line 216 of file SkImageFilterTypes.h.

216 {
217 LayerSpace<Vector> sum = *this;
218 sum += v;
219 return sum;
220 }

◆ operator+=()

void skif::LayerSpace< Vector >::operator+= ( const LayerSpace< Vector > &  v)
inline

Definition at line 231 of file SkImageFilterTypes.h.

231 {
232 fData.fX += v.fData.fX;
233 fData.fY += v.fData.fY;
234 }

◆ operator-() [1/2]

LayerSpace< Vector > skif::LayerSpace< Vector >::operator- ( ) const
inline

Definition at line 208 of file SkImageFilterTypes.h.

208{ return LayerSpace<Vector>({-fData.fX, -fData.fY}); }

◆ operator-() [2/2]

LayerSpace< Vector > skif::LayerSpace< Vector >::operator- ( const LayerSpace< Vector > &  v) const
inline

Definition at line 221 of file SkImageFilterTypes.h.

221 {
222 LayerSpace<Vector> diff = *this;
223 diff -= v;
224 return diff;
225 }

◆ operator-=()

void skif::LayerSpace< Vector >::operator-= ( const LayerSpace< Vector > &  v)
inline

Definition at line 235 of file SkImageFilterTypes.h.

235 {
236 fData.fX -= v.fData.fX;
237 fData.fY -= v.fData.fY;
238 }

◆ x()

SkScalar skif::LayerSpace< Vector >::x ( ) const
inline

Definition at line 203 of file SkImageFilterTypes.h.

203{ return fData.fX; }

◆ y()

SkScalar skif::LayerSpace< Vector >::y ( ) const
inline

Definition at line 204 of file SkImageFilterTypes.h.

204{ return fData.fY; }

Friends And Related Function Documentation

◆ operator*

LayerSpace< Vector > operator* ( SkScalar  s,
const LayerSpace< Vector > &  b 
)
friend

Definition at line 240 of file SkImageFilterTypes.h.

240 {
241 return b * s;
242 }
static bool b

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