/[gzz]/gzz/gzz/view/xubuoy.py
ViewVC logotype

Diff of /gzz/gzz/view/xubuoy.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.26 by tjl, Sun Oct 20 09:55:57 2002 UTC revision 1.27 by tjl, Fri Oct 25 02:57:18 2002 UTC
# Line 107  def puttext(cell, vs, cs, scale): Line 107  def puttext(cell, vs, cs, scale):
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):
# Line 161  class XuPDFBuoy: Line 162  class XuPDFBuoy:
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    
# Line 196  class XuPDFBuoy: Line 209  class XuPDFBuoy:
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    
# Line 214  class XuPDFBuoy: Line 232  class XuPDFBuoy:
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          """))          """))
# Line 528  class XuPDFScene_PDFContext: Line 549  class XuPDFScene_PDFContext:
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:

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26