Misc. tidy up.

git-svn-id: http://svn.osgeo.org/qgis/trunk@5290 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
g_j_m 2006-04-16 06:55:01 +00:00
parent 870c61aeb1
commit 9bffb8aaf7
2 changed files with 7 additions and 9 deletions

View File

@ -22,8 +22,8 @@
#ifdef WIN32
#include <limits>
#endif
#include <qstring.h>
#include <qtextstream.h>
#include <QString>
#include <QTextStream>
#include "qgspoint.h"
#include "qgsrect.h"
@ -86,7 +86,7 @@ void QgsRect::setMinimal()
ymax =-std::numeric_limits<double>::max();
}
void QgsRect::scale(double scaleFactor, QgsPoint * cp)
void QgsRect::scale(double scaleFactor, const QgsPoint * cp)
{
// scale from the center
double centerX, centerY;
@ -107,7 +107,7 @@ void QgsRect::scale(double scaleFactor, QgsPoint * cp)
ymax = centerY + newHeight / 2.0;
}
void QgsRect::expand(double scaleFactor, QgsPoint * cp)
void QgsRect::expand(double scaleFactor, const QgsPoint * cp)
{
// scale from the center
double centerX, centerY;

View File

@ -21,9 +21,7 @@
#include <iosfwd>
#ifndef QSTRING_H
#include <qstring.h>
#endif
class QString;
#include "qgspoint.h"
@ -79,9 +77,9 @@ class QgsRect
//! Center point of the rectangle
QgsPoint center() const;
//! Scale the rectangle around its center point
void scale(double, QgsPoint *c =0);
void scale(double, const QgsPoint *c =0);
//! Expand the rectangle to support zoom out scaling
void expand(double, QgsPoint *c = 0);
void expand(double, const QgsPoint *c = 0);
//! return the intersection with the given rectangle
QgsRect intersect(QgsRect *rect);
//! expand the rectangle so that covers both the original rectangle and the given rectangle