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 90 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 95 of file font_glyph_pair.h.

98  : glyph(p_glyph),
99  subpixel_offset(p_subpixel_offset),
100  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 103 of file font_glyph_pair.h.

103  {
104  if (!sg.properties.has_value()) {
105  return H::combine(std::move(h), sg.glyph.index, sg.subpixel_offset);
106  }
107  return H::combine(std::move(h), sg.glyph.index, sg.subpixel_offset,
108  sg.properties->color.ToARGB(), sg.properties->stroke,
109  sg.properties->stroke_cap, sg.properties->stroke_join,
110  sg.properties->stroke_miter, sg.properties->stroke_width);
111  }

Member Data Documentation

◆ glyph

◆ properties

◆ subpixel_offset

SubpixelPosition impeller::SubpixelGlyph::subpixel_offset

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