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 85 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 86 of file font_glyph_pair.h.

87  {
88  // Check simple non-optionals first.
89  if (lhs.glyph.index != rhs.glyph.index ||
90  lhs.glyph.type != rhs.glyph.type ||
91  lhs.subpixel_offset != rhs.subpixel_offset ||
92  // Mixmatch properties.
93  lhs.properties.has_value() != rhs.properties.has_value()) {
94  return false;
95  }
96  if (lhs.properties.has_value()) {
97  // Both have properties.
98  return GlyphProperties::Equal{}(lhs.properties.value(),
99  rhs.properties.value());
100  }
101  return true;
102  }
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

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: