comparison qt/d1/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
16 QRectF rt; 16 QRectF rt;
17 rt.xp = rt.yp = 0.; 17 rt.xp = rt.yp = 0.;
18 rt.w = rt.h = 0.; 18 rt.w = rt.h = 0.;
19 return rt; 19 return rt;
20 } 20 }
21 21
22 public static QRectF opCall(qreal aleft, qreal atop, qreal awidth, qreal aheight) 22 public static QRectF opCall(qreal aleft, qreal atop, qreal awidth, qreal aheight)
23 { 23 {
24 QRectF rt; 24 QRectF rt;
25 rt.xp = aleft; 25 rt.xp = aleft;
26 rt.yp = atop; 26 rt.yp = atop;
74 qreal y() // conts 74 qreal y() // conts
75 { return yp; } 75 { return yp; }
76 76
77 qreal left() // const 77 qreal left() // const
78 { return xp; } 78 { return xp; }
79 79
80 qreal top() // const 80 qreal top() // const
81 { return yp; } 81 { return yp; }
82 82
83 qreal right() // const 83 qreal right() // const
84 { return xp + w; } 84 { return xp + w; }
85 85
86 qreal bottom() // const 86 qreal bottom() // const
87 { return yp + h; } 87 { return yp + h; }
88 88
89 QPointF topLeft() // const 89 QPointF topLeft() // const
90 { return QPointF(xp, yp); } 90 { return QPointF(xp, yp); }
91 91
92 QPointF bottomRight() // const 92 QPointF bottomRight() // const
93 { return QPointF(xp+w, yp+h); } 93 { return QPointF(xp+w, yp+h); }
94 94
95 QPointF topRight() // const 95 QPointF topRight() // const
96 { return QPointF(xp+w, yp); } 96 { return QPointF(xp+w, yp); }
97 97
98 QPointF bottomLeft() // const 98 QPointF bottomLeft() // const
99 { return QPointF(xp, yp+h); } 99 { return QPointF(xp, yp+h); }
100 100
101 void setLeft(qreal pos) { qreal diff = pos - xp; xp += diff; w -= diff; } 101 void setLeft(qreal pos) { qreal diff = pos - xp; xp += diff; w -= diff; }
102 102
103 void setRight(qreal pos) { w = pos - xp; } 103 void setRight(qreal pos) { w = pos - xp; }
104 104
105 void setTop(qreal pos) { qreal diff = pos - yp; yp += diff; h -= diff; } 105 void setTop(qreal pos) { qreal diff = pos - yp; yp += diff; h -= diff; }
233 void size(in QSizeF s) 233 void size(in QSizeF s)
234 { 234 {
235 w = s.width(); 235 w = s.width();
236 h = s.height(); 236 h = s.height();
237 } 237 }
238 238
239 bool contains(qreal ax, qreal ay) // conts 239 bool contains(qreal ax, qreal ay) // conts
240 { 240 {
241 return contains(QPointF(ax, ay)); 241 return contains(QPointF(ax, ay));
242 } 242 }
243 243
293 public final QRectF opAnd(in QRectF r) { 293 public final QRectF opAnd(in QRectF r) {
294 return qtd_QRectF_operator_and_QRectF(this, &r); 294 return qtd_QRectF_operator_and_QRectF(this, &r);
295 } 295 }
296 296
297 public final void writeTo(QDataStream arg__1) { 297 public final void writeTo(QDataStream arg__1) {
298 qtd_QRectF_writeTo_QDataStream(this, arg__1 is null ? null : arg__1.__nativeId); 298 qtd_QRectF_writeTo_QDataStream(this, arg__1 is null ? null : arg__1.nativeId);
299 } 299 }
300 300
301 public final void readFrom(QDataStream arg__1) { 301 public final void readFrom(QDataStream arg__1) {
302 qtd_QRectF_readFrom_QDataStream(this, arg__1 is null ? null : arg__1.__nativeId); 302 qtd_QRectF_readFrom_QDataStream(this, arg__1 is null ? null : arg__1.nativeId);
303 } 303 }
304 304
305 public final QRectF opOr(in QRectF r) { 305 public final QRectF opOr(in QRectF r) {
306 return qtd_QRectF_operator_or_QRectF(this, &r); 306 return qtd_QRectF_operator_or_QRectF(this, &r);
307 } 307 }