Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
sk_fontations::AxisWrapper Class Reference

#include <SkTypeface_fontations_priv.h>

Inheritance diagram for sk_fontations::AxisWrapper:
fontations_ffi::AxisWrapper

Public Member Functions

 AxisWrapper (SkFontParameters::Variation::Axis axisArray[], size_t axisCount)
 
 AxisWrapper ()=delete
 
bool populate_axis (size_t i, uint32_t axisTag, float min, float def, float max, bool hidden) override
 
size_t size () const override
 
- Public Member Functions inherited from fontations_ffi::AxisWrapper
virtual ~AxisWrapper ()=default
 
virtual bool populate_axis (size_t i, uint32_t axisTag, float min, float def, float max, bool hidden)=0
 
virtual size_t size () const =0
 

Detailed Description

Implementation of AxisWrapper FFI C++ interface, allowing Rust to call back into C++ for populating variable axis availability information, see skpath_bridge.h.

Definition at line 52 of file SkTypeface_fontations_priv.h.

Constructor & Destructor Documentation

◆ AxisWrapper() [1/2]

sk_fontations::AxisWrapper::AxisWrapper ( SkFontParameters::Variation::Axis  axisArray[],
size_t  axisCount 
)

Definition at line 241 of file SkTypeface_fontations.cpp.

242 : fAxisArray(axisArray), fAxisCount(axisCount) {}

◆ AxisWrapper() [2/2]

sk_fontations::AxisWrapper::AxisWrapper ( )
delete

Member Function Documentation

◆ populate_axis()

bool sk_fontations::AxisWrapper::populate_axis ( size_t  i,
uint32_t  axisTag,
float  min,
float  def,
float  max,
bool  hidden 
)
overridevirtual

Implements fontations_ffi::AxisWrapper.

Definition at line 244 of file SkTypeface_fontations.cpp.

245 {
246 if (i >= fAxisCount) {
247 return false;
248 }
249 SkFontParameters::Variation::Axis& axis = fAxisArray[i];
250 axis.tag = axisTag;
251 axis.min = min;
252 axis.def = def;
253 axis.max = max;
254 axis.setHidden(hidden);
255 return true;
256}
static float max(float r, float g, float b)
Definition: hsl.cpp:49
static float min(float r, float g, float b)
Definition: hsl.cpp:48

◆ size()

size_t sk_fontations::AxisWrapper::size ( ) const
overridevirtual

Implements fontations_ffi::AxisWrapper.

Definition at line 258 of file SkTypeface_fontations.cpp.

258{ return fAxisCount; }

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