Mapper  0.9.0
API documentation
Public Member Functions | List of all members
OpenOrienteering::Symbol::lessByColor Struct Reference

A functor for comparing symbols by dominant colors. More...

#include <symbol.h>

Public Member Functions

 lessByColor (const Map *map)
 Constructs the functor for the given map. More...
 
bool operator() (const Symbol *s1, const Symbol *s2) const
 Operator which compares two symbols by dominant colors. More...
 

Detailed Description

A functor for comparing symbols by dominant colors.

Other than lessByColorPriority(), this comparison uses the lowest priority which exists for a particular RGB color in the map, i.e. it groups colors by RGB values (and orders the result by priority).

All map colors are preprocessed in the constructor. Thus the functor becomes invalid as soon as colors are changed.

Constructor & Destructor Documentation

◆ lessByColor()

OpenOrienteering::Symbol::lessByColor::lessByColor ( const Map map)

Constructs the functor for the given map.

Member Function Documentation

◆ operator()()

bool OpenOrienteering::Symbol::lessByColor::operator() ( const Symbol s1,
const Symbol s2 
) const

Operator which compares two symbols by dominant colors.

Returns
True if s1's dominant color exists with lower priority then s2's dominant color.

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