107 |
|
|
108 |
|
|
109 |
lineconn = GLRen.createLineConnector(0,0) |
lineconn = GLRen.createLineConnector(0,0) |
110 |
|
filletconn = GLRen.createSqFilletConnection(40, 1, .1, 6) |
111 |
|
|
112 |
class XuPDFBuoy: |
class XuPDFBuoy: |
113 |
def __init__(self, linkindex, link, enfoverlap): |
def __init__(self, linkindex, link, enfoverlap): |
162 |
mainp = mainlinkspan.getLocation() |
mainp = mainlinkspan.getLocation() |
163 |
mainoffsp = globalspan.getLocation() |
mainoffsp = globalspan.getLocation() |
164 |
maind = mainlinkspan.getSize() |
maind = mainlinkspan.getSize() |
165 |
mainpoint = globalview.paperpoint(mainpage, mainp.x-mainoffsp.x+0.5*maind.width, |
|
166 |
mainp.y-mainoffsp.y+0.5*maind.height) |
mup = globalview.paperpoint(mainpage, mainp.x + mainoffsp.x, mainp.y - mainoffsp.y) |
167 |
|
mlp = globalview.paperpoint(mainpage, mainp.x + mainoffsp.x + maind.width, |
168 |
|
mainp.y - mainoffsp.y + maind.height) |
169 |
|
ms = (mlp[0]-mup[0], mlp[1]-mup[1]) |
170 |
|
|
171 |
|
# mainpoint = globalview.paperpoint(mainpage, mainp.x-mainoffsp.x+0.5*maind.width, |
172 |
|
# mainp.y-mainoffsp.y+0.5*maind.height) |
173 |
else: |
else: |
174 |
mainpoint = (0, 0) |
mup = (0,0) |
175 |
|
mlp = (0,0) |
176 |
|
ms = (0,0) |
177 |
|
# mainpoint = (0, 0) |
178 |
|
|
179 |
main_end_cs = vs.coords.ortho(maincs, -20, mainpoint[0], mainpoint[1], 0, 0) |
mainpoint = mup |
180 |
|
# main_end_cs = vs.coords.ortho(maincs, -20, mainpoint[0], mainpoint[1], 0, 0) |
181 |
|
main_whole_cs = vs.coords.ortho(maincs, -20, mup[0], mup[1], ms[0], ms[1]) |
182 |
|
main_end_cs = vs.coords.translate(main_whole_cs, .5, .5, 0) |
183 |
|
|
184 |
cs1 = floater.buoyCoordsys(main_end_cs, self.cell.getId()) |
cs1 = floater.buoyCoordsys(main_end_cs, self.cell.getId()) |
185 |
|
|
209 |
|
|
210 |
# Then, the xu link connector |
# Then, the xu link connector |
211 |
|
|
212 |
link_end_cs = vs.coords.ortho(cs1_trans, -20, self.pctr[0], self.pctr[1], 0, 0) |
link_whole_cs = vs.coords.ortho(cs1_trans, -20, |
213 |
|
self.p0[0], self.p0[1], self.p1[0]-self.p0[0], |
214 |
|
self.p1[1]-self.p0[1]) |
215 |
|
link_end_cs = vs.coords.translate(link_whole_cs, .5, .5, 0) |
216 |
|
|
217 |
else: |
else: |
218 |
puttext(cell, vs, cs1, 1.2) |
puttext(cell, vs, cs1, 1.2) |
219 |
|
|
220 |
link_end_cs = vs.coords.ortho(cs1, -20, 0, 0, 0, 0) |
link_end_cs = vs.coords.ortho(cs1, -20, 0, 0, 0, 0) |
221 |
|
|
222 |
|
vs.matcher.add(main_whole_cs, "wlink"+str(self.link)+str(self.linkindex)) |
223 |
|
vs.matcher.add(link_whole_cs, "wlink"+str(self.link)+str(1-self.linkindex)) |
224 |
vs.matcher.add(main_end_cs, "link"+str(self.link)+str(self.linkindex)) |
vs.matcher.add(main_end_cs, "link"+str(self.link)+str(self.linkindex)) |
225 |
vs.matcher.add(link_end_cs, "link"+str(self.link)+str(1-self.linkindex)) |
vs.matcher.add(link_end_cs, "link"+str(self.link)+str(1-self.linkindex)) |
226 |
|
|
232 |
Enable BLEND |
Enable BLEND |
233 |
Color 0 0 0 0.6 |
Color 0 0 0 0.6 |
234 |
""")) |
""")) |
235 |
|
|
236 |
vs.map.put(lineconn, main_end_cs, link_end_cs) |
vs.map.put(lineconn, main_end_cs, link_end_cs) |
237 |
|
vs.map.put(filletconn, main_whole_cs, link_whole_cs) |
238 |
|
|
239 |
vs.map.put(GLCache.getCallList(""" |
vs.map.put(GLCache.getCallList(""" |
240 |
PopAttrib |
PopAttrib |
241 |
""")) |
""")) |
549 |
eye, eye, *(self.modes[0].mag)) |
eye, eye, *(self.modes[0].mag)) |
550 |
vs.matcher.add(cs1_zoom, self.cursor.getId()+"__bulg") |
vs.matcher.add(cs1_zoom, self.cursor.getId()+"__bulg") |
551 |
|
|
552 |
cs1_trans = vs.coords.translate(cs1_zoom, |
cs1_trans = vs.coords.translate(cs1_zoom, -globalx, -globaly + focusy_at) |
|
-globalx, -globaly + focusy_at) |
|
553 |
vs.matcher.add(cs1_trans, self.cursor.getId()+"__trans") |
vs.matcher.add(cs1_trans, self.cursor.getId()+"__trans") |
554 |
|
|
555 |
if self.clip: |
if self.clip: |