Skip to content

Commit

Permalink
[composer] Use miter joins for item frames (partial fix for #9479)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 5, 2014
1 parent b85faf1 commit 5adbaf7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/composer/qgscomposeritem.cpp
Expand Up @@ -100,6 +100,7 @@ void QgsComposerItem::init( bool manageZValue )
setBrush( QBrush( QColor( 255, 255, 255, 255 ) ) );
QPen defaultPen( QColor( 0, 0, 0 ) );
defaultPen.setWidthF( 0.3 );
defaultPen.setJoinStyle( Qt::MiterJoin );
setPen( defaultPen );
//let z-Value be managed by composition
if ( mComposition && manageZValue )
Expand Down Expand Up @@ -318,6 +319,7 @@ bool QgsComposerItem::_readXML( const QDomElement& itemElem, const QDomDocument&
{
QPen framePen( QColor( penRed, penGreen, penBlue, penAlpha ) );
framePen.setWidthF( penWidth );
framePen.setJoinStyle( Qt::MiterJoin );
setPen( framePen );
}
}
Expand Down
1 change: 1 addition & 0 deletions src/core/composer/qgscomposermap.cpp
Expand Up @@ -1467,6 +1467,7 @@ void QgsComposerMap::drawGridFrameBorder( QPainter* p, const QMap< double, doubl
//set pen to current frame pen
QPen framePen = QPen( mGridFramePenColor );
framePen.setWidthF( mGridFramePenThickness );
framePen.setJoinStyle( Qt::MiterJoin );
p->setPen( framePen );

QMap< double, double >::const_iterator posIt = pos.constBegin();
Expand Down
1 change: 1 addition & 0 deletions src/core/composer/qgscomposerscalebar.cpp
Expand Up @@ -234,6 +234,7 @@ void QgsComposerScaleBar::applyDefaultSettings()
mHeight = 3;

mPen = QPen( QColor( 0, 0, 0 ) );
mPen.setJoinStyle( Qt::MiterJoin );
mPen.setWidthF( 1.0 );

mBrush.setColor( QColor( 0, 0, 0 ) );
Expand Down
1 change: 1 addition & 0 deletions src/core/composer/qgscomposertable.cpp
Expand Up @@ -109,6 +109,7 @@ void QgsComposerTable::paint( QPainter* painter, const QStyleOptionGraphicsItem*
QPen gridPen;
gridPen.setWidthF( mGridStrokeWidth );
gridPen.setColor( mGridColor );
gridPen.setJoinStyle( Qt::MiterJoin );
painter->setPen( gridPen );
drawHorizontalGridLines( painter, attributeMaps.size() );
drawVerticalGridLines( painter, maxColumnWidthMap );
Expand Down

0 comments on commit 5adbaf7

Please sign in to comment.