Skip to content
Permalink
Browse files

Enable composition mode for advanced drawing (#6009)

* Enable composition mode for advanced drawing

Makes the lines pop off the map more and not get lost in the background.

Also adjusts the line size up to 1 as .7 it really small.
  • Loading branch information
NathanW2 committed Jan 8, 2018
1 parent 3d36653 commit 617459d253d8ba3293cdacc1d7e5bb2b0c069464
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/gui/qgsadvanceddigitizingcanvasitem.cpp
@@ -22,12 +22,12 @@

QgsAdvancedDigitizingCanvasItem::QgsAdvancedDigitizingCanvasItem( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget )
: QgsMapCanvasItem( canvas )
, mLockedPen( QPen( QColor( 100, 100, 255, 255 ), .7, Qt::DashLine ) )
, mConstruction1Pen( QPen( QColor( 100, 255, 100, 150 ), .7, Qt::DashLine ) )
, mConstruction2Pen( QPen( QColor( 100, 255, 100, 255 ), .7, Qt::DashLine ) )
, mSnapPen( QPen( QColor( 255, 175, 100, 150 ), 7 ) )
, mSnapLinePen( QPen( QColor( 200, 100, 50, 150 ), .7, Qt::DashLine ) )
, mCursorPen( QPen( QColor( 100, 255, 100, 255 ), .7 ) )
, mLockedPen( QPen( QColor( 0, 127, 0, 255 ), 1, Qt::DashLine ) )
, mConstruction1Pen( QPen( QColor( 127, 127, 127, 150 ), 1, Qt::DashLine ) )
, mConstruction2Pen( QPen( QColor( 127, 127, 127, 255 ), 1, Qt::DashLine ) )
, mSnapPen( QPen( QColor( 127, 0, 0, 150 ), 1 ) )
, mSnapLinePen( QPen( QColor( 127, 0, 0, 150 ), 1, Qt::DashLine ) )
, mCursorPen( QPen( QColor( 127, 127, 127, 255 ), 1 ) )
, mAdvancedDigitizingDockWidget( cadDockWidget )
{
}
@@ -80,6 +80,7 @@ void QgsAdvancedDigitizingCanvasItem::paint( QPainter *painter )
}

painter->setRenderHints( QPainter::Antialiasing );
painter->setCompositionMode( QPainter::CompositionMode_Difference );

// Draw point snap
if ( curPointExist && snappedToVertex )

0 comments on commit 617459d

Please sign in to comment.
You can’t perform that action at this time.