Mercurial > projects > qtd
diff qt/d1/qt/core/QPoint.d @ 254:34a37904ff77
(none)
author | maxter |
---|---|
date | Sun, 30 Aug 2009 10:59:56 +0000 |
parents | 37eed70de029 |
children |
line wrap: on
line diff
--- a/qt/d1/qt/core/QPoint.d Sun Aug 30 09:59:12 2009 +0000 +++ b/qt/d1/qt/core/QPoint.d Sun Aug 30 10:59:56 2009 +0000 @@ -61,7 +61,7 @@ QPoint opMulAssign(qreal c) { xp = qRound(xp*c); yp = qRound(yp*c); return *this; } - + bool opEquals(in QPoint p) { return xp == p.xp && yp == p.yp; } @@ -70,7 +70,7 @@ QPoint opSub(in QPoint p) { return QPoint(this.xp-p.xp, this.yp-p.yp); } - + QPoint opMul(qreal c) { return QPoint(qRound(this.xp*c), qRound(this.yp*c)); } @@ -87,11 +87,11 @@ } public final void writeTo(QDataStream arg__1) { - qtd_QPoint_writeTo_QDataStream(this, arg__1 is null ? null : arg__1.nativeId); + qtd_QPoint_writeTo_QDataStream(this, arg__1 is null ? null : arg__1.__nativeId); } public final void readFrom(QDataStream arg__1) { - qtd_QPoint_readFrom_QDataStream(this, arg__1 is null ? null : arg__1.nativeId); + qtd_QPoint_readFrom_QDataStream(this, arg__1 is null ? null : arg__1.__nativeId); } private: @@ -116,46 +116,46 @@ pt.xp = pt.yp = 0; return pt; } - + public static QPointF opCall(qreal xpos, qreal ypos) { QPointF pt; pt.xp = xpos; pt.yp = ypos; return pt; } - + public static QPointF opCall(in QPoint p) { QPointF pt; pt.xp = p.x(); pt.yp = p.y(); return pt; } - + bool isNull() //const { return qIsNull(xp) && qIsNull(yp); } - + qreal x() //const { return xp; } - + qreal y() //const { return yp; } - + void x(qreal xpos) { xp = xpos; } - + void y(qreal ypos) { yp = ypos; } -/* +/* inline qreal &QPointF::rx() { return xp; @@ -166,53 +166,53 @@ return yp; } */ - + QPointF opAddAssign(in QPointF p) { xp+=p.xp; yp+=p.yp; return *this; } - + QPointF opSubAssign(in QPointF p) { xp-=p.xp; yp-=p.yp; return *this; } - + QPointF opMulAssign(qreal c) { xp*=c; yp*=c; return *this; } - + bool opEquals(in QPointF p) { return qFuzzyCompare(xp, p.xp) && qFuzzyCompare(yp, p.yp); } - + QPointF opAdd(in QPointF p) { return QPointF(this.xp+p.xp, this.yp+p.yp); } - + QPointF opSub(in QPointF p) { return QPointF(this.xp-p.xp, this.yp-p.yp); } - + QPointF opMul(qreal c) { return QPointF(this.xp*c, this.yp*c); } - + QPointF opDivAssign(qreal c) { xp/=c; yp/=c; return *this; } - + QPointF opDiv(qreal c) { return QPointF(xp/c, yp/c); } - + QPoint toPoint() //const { return QPoint(qRound(xp), qRound(yp)); } - + public final void writeTo(QDataStream arg__1) { - qtd_QPointF_writeTo_QDataStream(this, arg__1 is null ? null : arg__1.nativeId); + qtd_QPointF_writeTo_QDataStream(this, arg__1 is null ? null : arg__1.__nativeId); } - + public final void readFrom(QDataStream arg__1) { - qtd_QPointF_readFrom_QDataStream(this, arg__1 is null ? null : arg__1.nativeId); + qtd_QPointF_readFrom_QDataStream(this, arg__1 is null ? null : arg__1.__nativeId); } - + private: qreal xp; qreal yp;