Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7
This commit is contained in:
+6
-4
@@ -20,14 +20,15 @@ static void include(QRect& r, const QRect& rect)
|
||||
}
|
||||
|
||||
/*
|
||||
A Clusterizer groups rectangles (QRects) into non-overlapping rectangles
|
||||
by a merging heuristic.
|
||||
* A Clusterizer groups rectangles (QRects) into non-overlapping
|
||||
* rectangles by a merging heuristic.
|
||||
*/
|
||||
Clusterizer::Clusterizer(int maxclusters) :
|
||||
cluster(new QRect[maxclusters]),
|
||||
count(0),
|
||||
max(maxclusters)
|
||||
{ }
|
||||
{
|
||||
}
|
||||
|
||||
Clusterizer::~Clusterizer()
|
||||
{
|
||||
@@ -51,7 +52,8 @@ void Clusterizer::add(int x, int y, int w, int h)
|
||||
|
||||
void Clusterizer::add(const QRect& rect)
|
||||
{
|
||||
QRect biggerrect(rect.x()-1,rect.y()-1,rect.width()+2,rect.height()+2);
|
||||
QRect biggerrect(rect.x() - 1, rect.y() - 1,
|
||||
rect.width() + 2, rect.height() + 2);
|
||||
|
||||
//assert(rect.width() > 0 && rect.height() > 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user