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, Point p_subpixel_offset, std::optional< GlyphProperties > p_properties)
 

Public Attributes

Glyph glyph
 
Point 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 60 of file font_glyph_pair.h.

Constructor & Destructor Documentation

◆ SubpixelGlyph()

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

Definition at line 65 of file font_glyph_pair.h.

68  : glyph(p_glyph),
69  subpixel_offset(p_subpixel_offset),
70  properties(p_properties) {}
std::optional< GlyphProperties > properties

Friends And Related Function Documentation

◆ AbslHashValue

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

Definition at line 73 of file font_glyph_pair.h.

73  {
74  if (!sg.properties.has_value()) {
75  return H::combine(std::move(h), sg.glyph.index, sg.subpixel_offset.x,
76  sg.subpixel_offset.y);
77  }
78  return H::combine(std::move(h), sg.glyph.index, sg.subpixel_offset.x,
79  sg.subpixel_offset.y, sg.properties->color.ToARGB(),
80  sg.properties->stroke, sg.properties->stroke_cap,
81  sg.properties->stroke_join, sg.properties->stroke_miter,
82  sg.properties->stroke_width);
83  }

Member Data Documentation

◆ glyph

◆ properties

◆ subpixel_offset

Point impeller::SubpixelGlyph::subpixel_offset

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