| Flutter Impeller |

Classes | Public Member Functions | Public Attributes | Friends | List of all members
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< GlyphProperties > | properties

## Friends
template<typename H >
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) {}
impeller::SubpixelGlyph::properties
std::optional< GlyphProperties > properties
Definition: font_glyph_pair.h:93
impeller::SubpixelGlyph::subpixel_offset
SubpixelPosition subpixel_offset
Definition: font_glyph_pair.h:92
impeller::SubpixelGlyph::glyph
Glyph glyph
Definition: font_glyph_pair.h:91

## Friends And Related Function Documentation

## ◆ AbslHashValue

template<typename H >

H AbslHashValue | ( | H | 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

Glyph impeller::SubpixelGlyph::glyph

Definition at line 91 of file font_glyph_pair.h.

Referenced by impeller::ComputeGlyphSize(), impeller::TextContents::ComputeVertexData(), impeller::DrawGlyph(), impeller::SubpixelGlyph::Equal::operator()(), and impeller::testing::TEST_P().

## ◆ properties

std::optional<GlyphProperties> impeller::SubpixelGlyph::properties

Definition at line 93 of file font_glyph_pair.h.

Referenced by impeller::BulkUpdateAtlasBitmap(), impeller::ComputeGlyphSize(), impeller::SubpixelGlyph::Equal::operator()(), and impeller::UpdateAtlasBitmap().

## ◆ subpixel_offset

SubpixelPosition impeller::SubpixelGlyph::subpixel_offset

Definition at line 92 of file font_glyph_pair.h.

Referenced by impeller::ComputeGlyphSize(), impeller::DrawGlyph(), and impeller::SubpixelGlyph::Equal::operator()().

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

- impeller/typographer/font_glyph_pair.h