@@ -508,6 +508,7 @@ QPixmap QgsGrassModule::pixmap ( QString path, int height )
508
508
QPixmap pixmap ( width, height );
509
509
pixmap.fill ( QColor (255 ,255 ,255 ) );
510
510
QPainter painter ( &pixmap );
511
+ painter.setRenderHint (QPainter::Antialiasing);
511
512
512
513
// I am not sure if this factor is OK
513
514
scale *= 72.0 / pixmap.logicalDpiX () ;
@@ -559,28 +560,31 @@ QPixmap QgsGrassModule::pixmap ( QString path, int height )
559
560
pixmap.fill (QColor (255 ,255 ,255 ));
560
561
QPainter painter ( &pixmap );
561
562
562
- QPen pen ( QColor ( 180 , 180 , 180 ), 3 );
563
- painter.setPen (pen );
563
+ QColor color ( 200 , 200 , 200 );
564
+ painter.setBrush ( QBrush (color) );
564
565
565
- QBrush brush (QColor (180 ,180 ,180 ));
566
- painter.setBrush (brush);
566
+ painter.setRenderHint (QPainter::Antialiasing);
567
567
568
568
int pos = 0 ;
569
569
for ( int i = 0 ; i < pixmaps.size (); i++ ) {
570
570
if ( i == 1 && pixmaps.size () == 3 ) { // +
571
571
pos += buffer;
572
- painter.drawLine ( pos, height/2 , pos+plusWidth+1 , height/2 );
573
- painter.drawLine ( pos+plusWidth/2 , height/2 -plusWidth/2 , pos+plusWidth/2 , height/2 +plusWidth/2 +1 );
572
+
573
+ painter.setPen ( QPen (color,3 ) );
574
+ painter.drawLine ( pos, height/2 , pos+plusWidth, height/2 );
575
+ painter.drawLine ( pos+plusWidth/2 , height/2 -plusWidth/2 , pos+plusWidth/2 , height/2 +plusWidth/2 );
574
576
pos += buffer + plusWidth;
575
577
}
576
578
if ( (i == 1 && pixmaps.size () == 2 ) || (i == 2 && pixmaps.size () == 3 ) ) { // ->
577
579
pos += buffer;
578
- painter.drawLine ( pos, height/2 , pos+arrowWidth, height/2 );
580
+ painter.setPen ( QPen (color,3 ) );
581
+ painter.drawLine ( pos, height/2 , pos+arrowWidth-arrowWidth/2 , height/2 );
579
582
580
583
Q3PointArray pa (3 );
581
- pa.setPoint (0 , pos+arrowWidth/2 +1 , height/2 -arrowWidth/4 );
584
+ pa.setPoint (0 , pos+arrowWidth/2 +1 , height/2 -arrowWidth/2 );
582
585
pa.setPoint (1 , pos+arrowWidth, height/2 );
583
- pa.setPoint (2 , pos+arrowWidth/2 +1 , height/2 +arrowWidth/4 );
586
+ pa.setPoint (2 , pos+arrowWidth/2 +1 , height/2 +arrowWidth/2 );
587
+ painter.setPen ( QPen (color,1 ) );
584
588
painter.drawPolygon ( pa );
585
589
586
590
pos += buffer + arrowWidth;
0 commit comments