| 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 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) {}
impeller::SubpixelGlyph::properties
std::optional< GlyphProperties > properties
Definition: font_glyph_pair.h:88
impeller::SubpixelGlyph::subpixel_offset
SubpixelPosition subpixel_offset
Definition: font_glyph_pair.h:87
impeller::SubpixelGlyph::glyph
Glyph glyph
Definition: font_glyph_pair.h:86

## Friends And Related Function Documentation

## ◆ AbslHashValue

template<typename H >

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

Glyph impeller::SubpixelGlyph::glyph

Definition at line 86 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 88 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 87 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