Mercurial > projects > qtd
annotate qt/core/QLine.d @ 114:547cd31fa12a
CMake: improve of the windows support for ldc.
author | SokoL_SD |
---|---|
date | Wed, 03 Jun 2009 15:53:24 +0000 |
parents | 323efbe5c2f7 |
children |
rev | line source |
---|---|
3
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
1 module qt.core.QLine; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
2 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
3 public import qt.QGlobal; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
4 public import qt.core.Qt; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
5 public import qt.core.QPoint; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
6 public import qt.core.QDataStream; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
7 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
8 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
9 public struct QLine |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
10 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
11 public static QLine opCall() { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
12 QLine ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
13 ln.pt1 = QPoint(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
14 ln.pt2 = QPoint(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
15 return ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
16 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
17 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
18 public static QLine opCall(ref QPoint pt1_, ref QPoint pt2_) { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
19 QLine ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
20 ln.pt1 = pt1_; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
21 ln.pt2 = pt2_; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
22 return ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
23 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
24 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
25 public static QLine opCall(int x1pos, int y1pos, int x2pos, int y2pos) { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
26 QLine ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
27 ln.pt1 = QPoint(x1pos, y1pos); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
28 ln.pt2 = QPoint(x2pos, y2pos); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
29 return ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
30 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
31 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
32 bool isNull() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
33 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
34 return pt1 == pt2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
35 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
36 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
37 int x1() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
38 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
39 return pt1.x(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
40 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
41 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
42 int y1() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
43 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
44 return pt1.y(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
45 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
46 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
47 int x2() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
48 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
49 return pt2.x(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
50 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
51 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
52 int y2() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
53 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
54 return pt2.y(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
55 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
56 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
57 QPoint p1() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
58 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
59 return pt1; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
60 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
61 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
62 QPoint p2() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
63 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
64 return pt2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
65 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
66 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
67 int dx() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
68 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
69 return pt2.x() - pt1.x(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
70 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
71 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
72 int dy() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
73 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
74 return pt2.y() - pt1.y(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
75 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
76 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
77 void translate(ref QPoint point) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
78 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
79 pt1 += point; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
80 pt2 += point; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
81 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
82 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
83 void translate(int adx, int ady) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
84 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
85 translate(QPoint(adx, ady)); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
86 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
87 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
88 QLine translated(ref QPoint p) // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
89 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
90 return QLine(pt1 + p, pt2 + p); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
91 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
92 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
93 QLine translated(int adx, int ady) // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
94 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
95 return translated(QPoint(adx, ady)); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
96 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
97 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
98 void p1(ref QPoint aP1) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
99 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
100 pt1 = aP1; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
101 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
102 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
103 void p2(ref QPoint aP2) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
104 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
105 pt2 = aP2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
106 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
107 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
108 void setP1(ref QPoint aP1) // for convenience |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
109 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
110 pt1 = aP1; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
111 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
112 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
113 void setP2(ref QPoint aP2) // for convenience |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
114 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
115 pt2 = aP2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
116 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
117 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
118 void setPoints(ref QPoint aP1, ref QPoint aP2) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
119 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
120 pt1 = aP1; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
121 pt2 = aP2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
122 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
123 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
124 void setLine(int aX1, int aY1, int aX2, int aY2) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
125 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
126 pt1 = QPoint(aX1, aY1); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
127 pt2 = QPoint(aX2, aY2); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
128 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
129 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
130 bool opEquals(ref QLine d) // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
131 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
132 return pt1 == d.pt1 && pt2 == d.pt2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
133 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
134 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
135 public final void writeTo(QDataStream arg__1) { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
136 qtd_QLine_writeTo_QDataStream(this, arg__1 is null ? null : arg__1.nativeId); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
137 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
138 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
139 public final void readFrom(QDataStream arg__1) { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
140 qtd_QLine_readFrom_QDataStream(this, arg__1 is null ? null : arg__1.nativeId); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
141 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
142 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
143 private: |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
144 QPoint pt1, pt2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
145 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
146 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
147 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
148 public enum QLineF_IntersectType { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
149 NoIntersection = 0, |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
150 BoundedIntersection = 1, |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
151 UnboundedIntersection = 2 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
152 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
153 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
154 public struct QLineF |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
155 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
156 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
157 alias QLineF_IntersectType IntersectType; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
158 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
159 alias QLineF_IntersectType.NoIntersection NoIntersection; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
160 alias QLineF_IntersectType.BoundedIntersection BoundedIntersection; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
161 alias QLineF_IntersectType.UnboundedIntersection UnboundedIntersection; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
162 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
163 public static QLineF opCall() { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
164 QLineF ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
165 ln.pt1 = QPointF(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
166 ln.pt2 = QPointF(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
167 return ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
168 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
169 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
170 public static QLineF opCall(ref QPointF apt1, ref QPointF apt2) { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
171 QLineF ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
172 ln.pt1 = apt1; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
173 ln.pt2 = apt2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
174 return ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
175 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
176 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
177 public static QLineF opCall(qreal x1pos, qreal y1pos, qreal x2pos, qreal y2pos) { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
178 QLineF ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
179 ln.pt1 = QPointF(x1pos, y1pos); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
180 ln.pt2 = QPointF(x2pos, y2pos); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
181 return ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
182 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
183 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
184 public static QLineF opCall(ref QLine line){ |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
185 QLineF ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
186 ln.pt1 = QPointF(line.p1()); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
187 ln.pt2 = QPointF(line.p2()); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
188 return ln; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
189 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
190 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
191 public final bool isNull() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
192 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
193 return qtd_QLineF_isNull(this); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
194 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
195 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
196 qreal x1() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
197 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
198 return pt1.x(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
199 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
200 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
201 qreal y1() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
202 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
203 return pt1.y(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
204 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
205 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
206 qreal x2() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
207 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
208 return pt2.x(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
209 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
210 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
211 qreal y2() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
212 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
213 return pt2.y(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
214 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
215 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
216 QPointF p1() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
217 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
218 return pt1; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
219 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
220 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
221 QPointF p2() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
222 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
223 return pt2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
224 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
225 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
226 qreal dx() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
227 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
228 return pt2.x() - pt1.x(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
229 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
230 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
231 qreal dy() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
232 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
233 return pt2.y() - pt1.y(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
234 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
235 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
236 QLineF normalVector() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
237 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
238 return QLineF(p1(), p1() + QPointF(dy(), -dx())); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
239 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
240 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
241 void translate(ref QPointF point) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
242 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
243 pt1 += point; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
244 pt2 += point; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
245 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
246 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
247 void translate(qreal adx, qreal ady) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
248 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
249 this.translate(QPointF(adx, ady)); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
250 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
251 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
252 QLineF translated(ref QPointF p) // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
253 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
254 return QLineF(pt1 + p, pt2 + p); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
255 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
256 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
257 QLineF translated(qreal adx, qreal ady) // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
258 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
259 return translated(QPointF(adx, ady)); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
260 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
261 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
262 void setLength(qreal len) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
263 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
264 if (isNull()) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
265 return; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
266 QLineF v = unitVector(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
267 pt2 = QPointF(pt1.x() + v.dx() * len, pt1.y() + v.dy() * len); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
268 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
269 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
270 void length(qreal len) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
271 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
272 if (isNull()) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
273 return; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
274 QLineF v = unitVector(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
275 pt2 = QPointF(pt1.x() + v.dx() * len, pt1.y() + v.dy() * len); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
276 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
277 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
278 QPointF pointAt(qreal t) // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
279 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
280 qreal vx = pt2.x() - pt1.x(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
281 qreal vy = pt2.y() - pt1.y(); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
282 return QPointF(pt1.x() + vx * t, pt1.y() + vy * t); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
283 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
284 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
285 QLine toLine() // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
286 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
287 return QLine(pt1.toPoint(), pt2.toPoint()); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
288 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
289 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
290 void setP1(ref QPointF aP1) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
291 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
292 pt1 = aP1; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
293 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
294 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
295 void setP2(ref QPointF aP2) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
296 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
297 pt2 = aP2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
298 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
299 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
300 void p1(ref QPointF aP1) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
301 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
302 pt1 = aP1; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
303 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
304 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
305 void p2(ref QPointF aP2) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
306 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
307 pt2 = aP2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
308 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
309 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
310 void setPoints(ref QPointF aP1, ref QPointF aP2) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
311 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
312 pt1 = aP1; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
313 pt2 = aP2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
314 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
315 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
316 void setLine(qreal aX1, qreal aY1, qreal aX2, qreal aY2) |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
317 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
318 pt1 = QPointF(aX1, aY1); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
319 pt2 = QPointF(aX2, aY2); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
320 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
321 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
322 bool opEquals(ref QLineF d) // const |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
323 { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
324 return pt1 == d.pt1 && pt2 == d.pt2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
325 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
326 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
327 public final double angle() { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
328 return qtd_QLineF_angle(this); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
329 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
330 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
331 public final double angle(ref QLineF l) { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
332 return qtd_QLineF_angle_QLineF(this, &l); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
333 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
334 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
335 public final double angleTo(ref QLineF l) { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
336 return qtd_QLineF_angleTo_QLineF(this, &l); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
337 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
338 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
339 // ### Qt 5: rename intersects() or intersection() and rename IntersectType IntersectionType |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
340 private final QLineF_IntersectType intersect(ref QLineF l, QPointF* intersectionPoint) { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
341 return cast(QLineF_IntersectType) qtd_QLineF_intersect_QLineF_nativepointerQPointF(this, &l, intersectionPoint); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
342 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
343 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
344 public final double length() { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
345 return qtd_QLineF_length(this); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
346 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
347 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
348 public final void writeTo(QDataStream arg__1) { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
349 qtd_QLineF_writeTo_QDataStream(this, arg__1 is null ? null : arg__1.nativeId); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
350 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
351 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
352 public final void readFrom(QDataStream arg__1) { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
353 qtd_QLineF_readFrom_QDataStream(this, arg__1 is null ? null : arg__1.nativeId); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
354 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
355 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
356 public final void setAngle(double angle) { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
357 qtd_QLineF_setAngle_double(this, angle); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
358 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
359 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
360 public final QLineF unitVector() { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
361 return qtd_QLineF_unitVector(this); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
362 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
363 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
364 public static QLineF fromPolar(double length, double angle) { |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
365 return qtd_QLineF_fromPolar_double_double(length, angle); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
366 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
367 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
368 private: |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
369 QPointF pt1, pt2; |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
370 } |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
371 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
372 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
373 // C wrappers |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
374 // QLine |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
375 private extern(C) void qtd_QLine_writeTo_QDataStream(void* __this_nativeId, |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
376 void* arg__1); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
377 private extern(C) void qtd_QLine_readFrom_QDataStream(void* __this_nativeId, |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
378 void* arg__1); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
379 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
380 // QLineF |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
381 private extern(C) bool qtd_QLineF_isNull(void* __this_nativeId); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
382 private extern(C) double qtd_QLineF_angle(void* __this_nativeId); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
383 private extern(C) double qtd_QLineF_angle_QLineF(void* __this_nativeId, |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
384 void* l0); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
385 private extern(C) double qtd_QLineF_angleTo_QLineF(void* __this_nativeId, |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
386 void* l0); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
387 private extern(C) int qtd_QLineF_intersect_QLineF_nativepointerQPointF(void* __this_nativeId, |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
388 void* l0, |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
389 void* intersectionPoint1); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
390 private extern(C) double qtd_QLineF_length(void* __this_nativeId); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
391 private extern(C) void qtd_QLineF_writeTo_QDataStream(void* __this_nativeId, |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
392 void* arg__1); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
393 private extern(C) void qtd_QLineF_readFrom_QDataStream(void* __this_nativeId, |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
394 void* arg__1); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
395 private extern(C) void qtd_QLineF_setAngle_double(void* __this_nativeId, |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
396 double angle0); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
397 |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
398 private extern(C) QLineF qtd_QLineF_unitVector(void* __this_nativeId); |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
399 private extern(C) QLineF qtd_QLineF_fromPolar_double_double(double length0, |
323efbe5c2f7
native wrap of QLine and QLineF, fixes in opEquals, updated QPainter to the use of native structs
eldar
parents:
diff
changeset
|
400 double angle1); |