mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	Fixed SIP errors and reinstated expand() as depreceated.
This commit is contained in:
		
							parent
							
								
									6fd2dccbd7
								
							
						
					
					
						commit
						8e16c8e37a
					
				@ -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() ) );
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user