Flutter Engine
 
Loading...
Searching...
No Matches
impeller::SubpixelGlyph::Equal Struct Reference

#include <font_glyph_pair.h>

Public Member Functions

constexpr bool operator() (const impeller::SubpixelGlyph &lhs, const impeller::SubpixelGlyph &rhs) const
 

Detailed Description

Definition at line 112 of file font_glyph_pair.h.

Member Function Documentation

◆ operator()()

constexpr bool impeller::SubpixelGlyph::Equal::operator() ( const impeller::SubpixelGlyph lhs,
const impeller::SubpixelGlyph rhs 
) const
inlineconstexpr

Definition at line 113 of file font_glyph_pair.h.

114 {
115 // Check simple non-optionals first.
116 if (lhs.glyph.index != rhs.glyph.index ||
117 lhs.glyph.type != rhs.glyph.type ||
118 lhs.subpixel_offset != rhs.subpixel_offset ||
119 // Mixmatch properties.
120 lhs.properties.has_value() != rhs.properties.has_value()) {
121 return false;
122 }
123 if (lhs.properties.has_value()) {
124 // Both have properties.
125 return GlyphProperties::Equal{}(lhs.properties.value(),
126 rhs.properties.value());
127 }
128 return true;
129 }
uint16_t index
Definition glyph.h:22
Type type
Whether the glyph is a path or a bitmap.
Definition glyph.h:27
std::optional< GlyphProperties > properties
SubpixelPosition subpixel_offset

References impeller::SubpixelGlyph::glyph, impeller::Glyph::index, impeller::SubpixelGlyph::properties, impeller::SubpixelGlyph::subpixel_offset, and impeller::Glyph::type.


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