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

Public Member Functions

 LayerSpace ()=default
 
 LayerSpace (ZValue z)
 
float val () const
 

Static Public Member Functions

static LayerSpace< ZValue > Map (const Mapping &mapping, ParameterSpace< ZValue > z)
 

Detailed Description

Definition at line 55 of file SkLightingImageFilter.cpp.

Constructor & Destructor Documentation

◆ LayerSpace() [1/2]

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

◆ LayerSpace() [2/2]

skif::LayerSpace< ZValue >::LayerSpace ( ZValue  z)
inlineexplicit

Definition at line 58 of file SkLightingImageFilter.cpp.

58: fData(z) {}

Member Function Documentation

◆ Map()

static LayerSpace< ZValue > skif::LayerSpace< ZValue >::Map ( const Mapping mapping,
ParameterSpace< ZValue >  z 
)
inlinestatic

Definition at line 62 of file SkLightingImageFilter.cpp.

62 {
63 // See comment on ZValue for rationale.
64 skif::LayerSpace<skif::Vector> z2d = mapping.paramToLayer(
65 skif::ParameterSpace<skif::Vector>({ZValue(z), ZValue(z)}));
66 return LayerSpace<ZValue>(SkScalarAve(z2d.x(), z2d.y()));
67 }
#define SkScalarAve(a, b)
Definition: SkScalar.h:74

◆ val()

float skif::LayerSpace< ZValue >::val ( ) const
inline

Definition at line 60 of file SkLightingImageFilter.cpp.

60{ return fData.fZ; }

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