Mercurial > projects > qtd
diff qt/core/QSize.d @ 3:323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
author | eldar |
---|---|
date | Wed, 13 May 2009 17:34:40 +0000 |
parents | e78566595089 |
children |
line wrap: on
line diff
--- a/qt/core/QSize.d Wed May 13 01:20:34 2009 +0000 +++ b/qt/core/QSize.d Wed May 13 17:34:40 2009 +0000 @@ -47,11 +47,11 @@ final void height(int h) { ht = h; } - - final void setWidth(int w) + + final void setWidth(int w) // for convenience { wd = w; } - void setHeight(int h) + final void setHeight(int h) // for convenience { ht = h; } void transpose() { @@ -93,8 +93,8 @@ QSize opMulAssign(qreal c) { wd = qRound(wd*c); ht = qRound(ht*c); return *this; } - bool opEquals(ref QSize s1, ref QSize s2) - { return s1.wd == s2.wd && s1.ht == s2.ht; } + bool opEquals(ref QSize s) + { return wd == s.wd && ht == s.ht; } QSize opAdd(ref QSize s) { return QSize(this.wd+s.wd, this.ht+s.ht); } @@ -216,8 +216,8 @@ QSizeF opMulAssign(qreal c) { wd *= c; ht *= c; return *this; } - bool opEquals(ref QSizeF s1, ref QSizeF s2) - { return qFuzzyCompare(s1.wd, s2.wd) && qFuzzyCompare(s1.ht, s2.ht); } + bool opEquals(ref QSizeF s) + { return qFuzzyCompare(wd, s.wd) && qFuzzyCompare(ht, s.ht); } QSizeF opAdd(ref QSizeF s) { return QSizeF(this.wd+s.wd, this.ht+s.ht); }