Skip to content

Commit

Permalink
Make toCanvasCoordinate(QRect) method private in QgsMapCanvasItem
Browse files Browse the repository at this point in the history
I added this for rotation support but the interface is probably not
something any external code should rely upon.
  • Loading branch information
Sandro Santilli committed Dec 9, 2014
1 parent aa0b98d commit 5683ebd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/gui/qgsmapcanvasitem.cpp
Expand Up @@ -67,6 +67,7 @@ QPointF QgsMapCanvasItem::toCanvasCoordinates( const QgsPoint& point )
return QPointF( x, y ) + mPanningOffset;
}

// private
QRectF QgsMapCanvasItem::toCanvasCoordinates( const QRectF& rect )
{
QPointF tl( toCanvasCoordinates( rect.topLeft() ) );
Expand Down
9 changes: 8 additions & 1 deletion src/gui/qgsmapcanvasitem.h
Expand Up @@ -76,7 +76,6 @@ class GUI_EXPORT QgsMapCanvasItem : public QGraphicsItem

//! transformation from map coordinates to screen coordinates
QPointF toCanvasCoordinates( const QgsPoint& point );
QRectF toCanvasCoordinates( const QRectF& rect );

protected:

Expand All @@ -92,6 +91,14 @@ class GUI_EXPORT QgsMapCanvasItem : public QGraphicsItem

//! cached size of the item (to return in boundingRect())
QSizeF mItemSize;

private:

//! transformation from map coordinates to screen coordinates
//! if rotation is set it is taken in consideration so that
//! the returned rectangle is the bounding box of the rotated input
QRectF toCanvasCoordinates( const QRectF& rect );

};


Expand Down

0 comments on commit 5683ebd

Please sign in to comment.