Flutter Impeller
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 113 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 114 of file font_glyph_pair.h.

115  {
116  // Check simple non-optionals first.
117  if (lhs.glyph.index != rhs.glyph.index ||
118  lhs.glyph.type != rhs.glyph.type ||
119  lhs.subpixel_offset != rhs.subpixel_offset ||
120  // Mixmatch properties.
121  lhs.properties.has_value() != rhs.properties.has_value()) {
122  return false;
123  }
124  if (lhs.properties.has_value()) {
125  // Both have properties.
126  return GlyphProperties::Equal{}(lhs.properties.value(),
127  rhs.properties.value());
128  }
129  return true;
130  }
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: