Flutter Impeller
impeller::SubpixelGlyph Struct Reference

A glyph and its subpixel position. More...

#include <font_glyph_pair.h>

Classes

struct  Equal
 

Public Member Functions

 SubpixelGlyph (Glyph p_glyph, SubpixelPosition p_subpixel_offset, std::optional< GlyphProperties > p_properties)
 

Public Attributes

Glyph glyph
 
SubpixelPosition subpixel_offset
 
std::optional< GlyphPropertiesproperties
 

Friends

template<typename H >
AbslHashValue (H h, const SubpixelGlyph &sg)
 

Detailed Description

A glyph and its subpixel position.

Definition at line 85 of file font_glyph_pair.h.

Constructor & Destructor Documentation

◆ SubpixelGlyph()

impeller::SubpixelGlyph::SubpixelGlyph ( Glyph  p_glyph,
SubpixelPosition  p_subpixel_offset,
std::optional< GlyphProperties p_properties 
)
inline

Definition at line 90 of file font_glyph_pair.h.

93  : glyph(p_glyph),
94  subpixel_offset(p_subpixel_offset),
95  properties(p_properties) {}
std::optional< GlyphProperties > properties
SubpixelPosition subpixel_offset

Friends And Related Function Documentation

◆ AbslHashValue

template<typename H >
H AbslHashValue ( h,
const SubpixelGlyph sg 
)
friend

Definition at line 98 of file font_glyph_pair.h.

98  {
99  if (!sg.properties.has_value()) {
100  return H::combine(std::move(h), sg.glyph.index, sg.subpixel_offset);
101  }
102  StrokeParameters stroke;
103  bool has_stroke = sg.properties->stroke.has_value();
104  if (has_stroke) {
105  stroke = sg.properties->stroke.value();
106  }
107  return H::combine(std::move(h), sg.glyph.index, sg.subpixel_offset,
108  sg.properties->color.ToARGB(), has_stroke, stroke.cap,
109  stroke.join, stroke.miter_limit, stroke.width);
110  }

Member Data Documentation

◆ glyph

◆ properties

◆ subpixel_offset

SubpixelPosition impeller::SubpixelGlyph::subpixel_offset

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