Skip to content
Permalink
Browse files

Make toCanvasCoordinate(QRect) method private in QgsMapCanvasItem

I added this for rotation support but the interface is probably not
something any external code should rely upon.
  • Loading branch information
Sandro Santilli
Sandro Santilli committed Dec 9, 2014
1 parent aa0b98d commit 5683ebda205c45a59256afa5622339b9dc7a9f8a
Showing with 9 additions and 1 deletion.
  1. +1 −0 src/gui/qgsmapcanvasitem.cpp
  2. +8 −1 src/gui/qgsmapcanvasitem.h
@@ -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() ) );
@@ -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:

@@ -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 );

};


0 comments on commit 5683ebd

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