MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / highlightedColor

Function highlightedColor

src/core/renderables/renderable.cpp:652–667  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650
651namespace {
652 inline
653 QColor highlightedColor(const QColor& original)
654 {
655 const int highlight_alpha = 255;
656
657 if (original.value() > 127)
658 {
659 const qreal factor = 0.35;
660 return QColor(factor * original.red(), factor * original.green(), factor * original.blue(), highlight_alpha);
661 }
662 else
663 {
664 const qreal factor = 0.15;
665 return QColor(255 - factor * (255 - original.red()), 255 - factor * (255 - original.green()), 255 - factor * (255 - original.blue()), highlight_alpha);
666 }
667 }
668}
669
670bool PainterConfig::activate(QPainter* painter, const QPainterPath*& current_clip, const RenderConfig& config, const QColor& color, const QPainterPath& initial_clip) const

Callers 1

activateMethod · 0.85

Calls 2

QColorClass · 0.70
valueMethod · 0.45

Tested by

no test coverage detected