src/editmodes/circleMode.cc

changeset 840
d077dd19bf9a
parent 830
a741a0b9df49
child 842
e1c9010eb9e8
equal deleted inserted replaced
839:5f822ad61875 840:d077dd19bf9a
59 59
60 for (int i = 0; i < 9; ++i) 60 for (int i = 0; i < 9; ++i)
61 { 61 {
62 if (transform[i] == 2) 62 if (transform[i] == 2)
63 transform[i] = scale; 63 transform[i] = scale;
64 elif (transform[i] == 1 && renderer()->camera() >= 3) 64 elif (transform[i] == 1 and renderer()->camera() >= 3)
65 transform[i] = -1; 65 transform[i] = -1;
66 } 66 }
67 67
68 return transform; 68 return transform;
69 } 69 }
86 // If the radii are the same, there's no ring space to fill. Use a circle. 86 // If the radii are the same, there's no ring space to fill. Use a circle.
87 refFile = getDocument ("4-4edge.dat"); 87 refFile = getDocument ("4-4edge.dat");
88 transform = getCircleDrawMatrix (dist0); 88 transform = getCircleDrawMatrix (dist0);
89 circleOrDisc = true; 89 circleOrDisc = true;
90 } 90 }
91 elif (dist0 == 0 || dist1 == 0) 91 elif (dist0 == 0 or dist1 == 0)
92 { 92 {
93 // If either radii is 0, use a disc. 93 // If either radii is 0, use a disc.
94 refFile = getDocument ("4-4disc.dat"); 94 refFile = getDocument ("4-4disc.dat");
95 transform = getCircleDrawMatrix ((dist0 != 0) ? dist0 : dist1); 95 transform = getCircleDrawMatrix ((dist0 != 0) ? dist0 : dist1);
96 circleOrDisc = true; 96 circleOrDisc = true;
157 157
158 objs << quad; 158 objs << quad;
159 } 159 }
160 } 160 }
161 161
162 if (circleOrDisc && refFile != null) 162 if (circleOrDisc and refFile != null)
163 { 163 {
164 LDSubfilePtr ref = spawn<LDSubfile>(); 164 LDSubfilePtr ref = spawn<LDSubfile>();
165 ref->setFileInfo (refFile); 165 ref->setFileInfo (refFile);
166 ref->setTransform (transform); 166 ref->setTransform (transform);
167 ref->setPosition (_drawedVerts[0]); 167 ref->setPosition (_drawedVerts[0]);

mercurial