Mercurial > projects > qtd
comparison qt/d2/qt/core/QRectF.d @ 252:37eed70de029
More things broken than fixed. Rolling back to 263
author | maxter |
---|---|
date | Sat, 22 Aug 2009 12:50:58 +0000 |
parents | 7664de4a55e5 |
children | 34a37904ff77 |
comparison
equal
deleted
inserted
replaced
251:739d0ee5bd91 | 252:37eed70de029 |
---|---|
15 QRectF rt; | 15 QRectF rt; |
16 rt.xp = rt.yp = 0.; | 16 rt.xp = rt.yp = 0.; |
17 rt.w = rt.h = 0.; | 17 rt.w = rt.h = 0.; |
18 return rt; | 18 return rt; |
19 } | 19 } |
20 | 20 |
21 public this(qreal aleft, qreal atop, qreal awidth, qreal aheight) | 21 public this(qreal aleft, qreal atop, qreal awidth, qreal aheight) |
22 { | 22 { |
23 xp = aleft; | 23 xp = aleft; |
24 yp = atop; | 24 yp = atop; |
25 w = awidth; | 25 w = awidth; |
65 qreal y() const | 65 qreal y() const |
66 { return yp; } | 66 { return yp; } |
67 | 67 |
68 qreal left() const | 68 qreal left() const |
69 { return xp; } | 69 { return xp; } |
70 | 70 |
71 qreal top() const | 71 qreal top() const |
72 { return yp; } | 72 { return yp; } |
73 | 73 |
74 qreal right() const | 74 qreal right() const |
75 { return xp + w; } | 75 { return xp + w; } |
76 | 76 |
77 qreal bottom() const | 77 qreal bottom() const |
78 { return yp + h; } | 78 { return yp + h; } |
79 | 79 |
80 QPointF topLeft() const | 80 QPointF topLeft() const |
81 { return QPointF(xp, yp); } | 81 { return QPointF(xp, yp); } |
82 | 82 |
83 QPointF bottomRight() const | 83 QPointF bottomRight() const |
84 { return QPointF(xp+w, yp+h); } | 84 { return QPointF(xp+w, yp+h); } |
85 | 85 |
86 QPointF topRight() const | 86 QPointF topRight() const |
87 { return QPointF(xp+w, yp); } | 87 { return QPointF(xp+w, yp); } |
88 | 88 |
89 QPointF bottomLeft() const | 89 QPointF bottomLeft() const |
90 { return QPointF(xp, yp+h); } | 90 { return QPointF(xp, yp+h); } |
91 | 91 |
92 void setLeft(qreal pos) { qreal diff = pos - xp; xp += diff; w -= diff; } | 92 void setLeft(qreal pos) { qreal diff = pos - xp; xp += diff; w -= diff; } |
93 | 93 |
94 void setRight(qreal pos) { w = pos - xp; } | 94 void setRight(qreal pos) { w = pos - xp; } |
95 | 95 |
96 void setTop(qreal pos) { qreal diff = pos - yp; yp += diff; h -= diff; } | 96 void setTop(qreal pos) { qreal diff = pos - yp; yp += diff; h -= diff; } |
224 void size(ref QSizeF s) | 224 void size(ref QSizeF s) |
225 { | 225 { |
226 w = s.width(); | 226 w = s.width(); |
227 h = s.height(); | 227 h = s.height(); |
228 } | 228 } |
229 | 229 |
230 bool contains(qreal ax, qreal ay) const | 230 bool contains(qreal ax, qreal ay) const |
231 { | 231 { |
232 return contains(QPointF(ax, ay)); | 232 return contains(QPointF(ax, ay)); |
233 } | 233 } |
234 | 234 |
284 public final QRectF opAnd(ref QRectF r) const { | 284 public final QRectF opAnd(ref QRectF r) const { |
285 return qtd_QRectF_operator_and_QRectF(cast(void*)&this, &r); | 285 return qtd_QRectF_operator_and_QRectF(cast(void*)&this, &r); |
286 } | 286 } |
287 | 287 |
288 public final void writeTo(QDataStream arg__1) { | 288 public final void writeTo(QDataStream arg__1) { |
289 qtd_QRectF_writeTo_QDataStream(&this, arg__1 is null ? null : arg__1.__nativeId); | 289 qtd_QRectF_writeTo_QDataStream(&this, arg__1 is null ? null : arg__1.nativeId); |
290 } | 290 } |
291 | 291 |
292 public final void readFrom(QDataStream arg__1) { | 292 public final void readFrom(QDataStream arg__1) { |
293 qtd_QRectF_readFrom_QDataStream(&this, arg__1 is null ? null : arg__1.__nativeId); | 293 qtd_QRectF_readFrom_QDataStream(&this, arg__1 is null ? null : arg__1.nativeId); |
294 } | 294 } |
295 | 295 |
296 public final QRectF opOr(ref QRectF r) const { | 296 public final QRectF opOr(ref QRectF r) const { |
297 return qtd_QRectF_operator_or_QRectF(cast(void*)&this, &r); | 297 return qtd_QRectF_operator_or_QRectF(cast(void*)&this, &r); |
298 } | 298 } |