0001-4819_01.patch

Thomas Arnold, 2012-06-22 01:44 AM

Download (1.72 KB)

View differences:

src/app/qgshighlight.cpp
19 19
#include "qgsmaprenderer.h"
20 20
#include "qgscoordinatetransform.h"
21 21
#include "qgsvectorlayer.h"
22
#include <QPainter>
23 22

  
24 23
/*!
25 24
  \class QgsHighlight
......
93 92

  
94 93
void QgsHighlight::paintPolygon( QPainter *p, QgsPolygon polygon )
95 94
{
96
  QPolygonF poly;
95
  // OddEven fill rule by default
96
  QPainterPath path;
97 97

  
98
  // just ring outlines, no fill
99 98
  p->setPen( mPen );
100
  p->setBrush( Qt::NoBrush );
99
  p->setBrush( mBrush );
101 100

  
102 101
  for ( int i = 0; i < polygon.size(); i++ )
103 102
  {
......
110 109

  
111 110
    ring[ polygon[i].size()] = ring[ 0 ];
112 111

  
113
    p->drawPolygon( ring );
114

  
115
    if ( i == 0 )
116
      poly = ring;
117
    else
118
      poly = poly.subtracted( ring );
112
    path.addPolygon( ring );
119 113
  }
120 114

  
121
  // just fill, no outline
122
  p->setPen( Qt::NoPen );
123
  p->setBrush( mBrush );
124
  p->drawPolygon( poly );
115
  p->drawPath( path );
125 116
}
126 117

  
127 118
/*!
src/app/qgshighlight.h
21 21
#include <QList>
22 22
#include <QPen>
23 23
#include <QPainter>
24
#include <QPainterPath>
24 25

  
25 26
class QgsVectorLayer;
26 27

  
27
-