Skip to content

Commit

Permalink
When mapping color for rendering highlighted (identified) features,
Browse files Browse the repository at this point in the history
don't allow pixels which were previously non-transparent to become
totally transparent.

This can result in invisible highlights for very transparent symbols.

Fixes #54830

(cherry picked from commit 250c156)
  • Loading branch information
nyalldawson committed Oct 10, 2023
1 parent ef8cd27 commit 33dc65b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/qgshighlight.cpp
Expand Up @@ -379,7 +379,7 @@ void QgsHighlight::paint( QPainter *p )
if ( alpha > 0 )
{
int green = qGreen( line[c] );
line[c] = qRgba( penRed, penGreen, penBlue, std::clamp( static_cast< int >( alpha - ( green * k ) ), 0, 255 ) );
line[c] = qRgba( penRed, penGreen, penBlue, std::clamp( static_cast< int >( alpha - ( green * k ) ), 30, 255 ) );
}
}
}
Expand Down

0 comments on commit 33dc65b

Please sign in to comment.