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

## Public Attributes
Glyph | glyph
Point | 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 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) {}
impeller::SubpixelGlyph::properties
std::optional< GlyphProperties > properties
Definition: font_glyph_pair.h:63
impeller::SubpixelGlyph::subpixel_offset
Point subpixel_offset
Definition: font_glyph_pair.h:62
impeller::SubpixelGlyph::glyph
Glyph glyph
Definition: font_glyph_pair.h:61

## Friends And Related Function Documentation

## ◆ AbslHashValue

template<typename H >

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

Glyph impeller::SubpixelGlyph::glyph

Definition at line 61 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 63 of file font_glyph_pair.h.

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

## ◆ subpixel_offset

Point impeller::SubpixelGlyph::subpixel_offset

Definition at line 62 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