Skip to content
Permalink
Browse files

Fixed SIP errors and reinstated expand() as depreceated.

  • Loading branch information
homann committed Aug 17, 2012
1 parent 6fd2dcc commit 8e16c8e37a243588705f447916c77254428f4091
@@ -72,7 +72,7 @@
%Include qgsrastershaderfunction.sip
%Include qgsrastertransparency.sip
%Include qgsrasterviewport.sip
%Include qgsrect.sip
%Include qgsrectangle.sip
%Include qgsrendercontext.sip
%Include qgsrenderer.sip
%Include qgsrunprocess.sip
@@ -56,7 +56,8 @@ class QgsRectangle
//! Scale the rectangle around its center point
void scale(double, const QgsPoint *c =0);
//! Expand the rectangle to support zoom out scaling
void expand(double, const QgsPoint *c = 0);
// @depreceated use scale instead
void expand(double, const QgsPoint *c = 0) /Depreceated/;
//! return the intersection with the given rectangle
QgsRectangle intersect(const QgsRectangle *rect);
//! returns true when rectangle intersects with other rectangle
@@ -76,7 +76,8 @@ class CORE_EXPORT QgsRectangle
//! Center point of the rectangle
QgsPoint center() const;
//! Scale the rectangle around its center point
void scale( double, const QgsPoint *c = 0 );
void scale( double scaleFactor, const QgsPoint *c = 0 );
Q_DECL_DEPRECATED void expand( double scaleFactor, const QgsPoint *c = 0 ) { return scale( scaleFactor * 2.0, c ); }
//! return the intersection with the given rectangle
QgsRectangle intersect( const QgsRectangle *rect ) const;
//! returns true when rectangle intersects with other rectangle
@@ -128,7 +128,7 @@ void QgsMapToolZoom::canvasReleaseEvent( QMouseEvent * e )
{
sf = extent.height() / r.height();
}
sf = sf / 2.0;
sf = sf * 2.0;
r.scale( sf );

QgsDebugMsg( QString( "Extent scaled by %1 to %2" ).arg( sf ).arg( r.toString().toLocal8Bit().constData() ) );

0 comments on commit 8e16c8e

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