/[gzz]/gzz/metacode/umltool.py
ViewVC logotype

Diff of /gzz/metacode/umltool.py

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

revision 1.6 by humppake, Thu Dec 19 13:46:30 2002 UTC revision 1.7 by humppake, Thu Dec 19 16:13:18 2002 UTC
# Line 662  class jlink: Line 662  class jlink:
662              mapper(self.corners[2], self.corners[3])              mapper(self.corners[2], self.corners[3])
663          )]          )]
664          print "Mapped: ", self.corners          print "Mapped: ", self.corners
665      def imgmapanchor(self):      def getTarget(self):
666            """Returns jlink's target with "full path",
667            but without .foo postfix."""
668            ts = self.name.split(".")
669            target = (settings['javadoc']+"/"+"/".join(ts))
670            return (target)
671        def imgmapanchor(self, zoom=100):
672          ts = self.name.split(".")          ts = self.name.split(".")
673          if re.search("html", ts[-1]):          if re.search("html", ts[-1]):
674              target = self.name              target = self.name
# Line 675  class jlink: Line 681  class jlink:
681                        +"/".join(ts)                        +"/".join(ts)
682                        + ".html")                        + ".html")
683          return """<area href="%s" shape="rect" coords="%s" target="_top" title="%s" alt="%s" />\n""" % (          return """<area href="%s" shape="rect" coords="%s" target="_top" title="%s" alt="%s" />\n""" % (
684              target, ",".join(["%s"%c for c in self.corners]), self.name, self.name)              target, ",".join(["%s"%(int(c*(zoom*0.01))) for c in self.corners]), self.name, self.name)
685                    
686    
687  def roundDown(x):  def roundDown(x):
# Line 700  class psbbox: Line 706  class psbbox:
706                  "-xsize", self.w * scale, "-ysize", self.h * scale,                  "-xsize", self.w * scale, "-ysize", self.h * scale,
707                  "-xborder", 0, "-yborder", 0]]                  "-xborder", 0, "-yborder", 0]]
708    
709  def run(prefix_in, prefix_out=""):  def run(prefix_in, prefix_out="", zoom=100):
710      if prefix_out == "": prefix_out = prefix_in      if prefix_out == "": prefix_out = prefix_in
711      if not prefix_out.endswith(".gen"): prefix_out = prefix_out + ".gen"      if not prefix_out.endswith(".gen"): prefix_out = prefix_out + ".gen"
712    
# Line 782  def run(prefix_in, prefix_out=""): Line 788  def run(prefix_in, prefix_out=""):
788          </HTML>          </HTML>
789          """ % { "prefix_in": prefix_in,          """ % { "prefix_in": prefix_in,
790                  "filename": prefix_out+".png",                  "filename": prefix_out+".png",
791                  "links": " ".join([l.imgmapanchor() for l in links]) }                  "links": " ".join([l.imgmapanchor(zoom) for l in links]) }
792      html = open(path+prefix_out+".html", "w")      html = open(path+prefix_out+".html", "w")
793      html.write(htmlcode)      html.write(htmlcode)
794      html.close()      html.close()
795    
796        targets = []
797        for l in links:
798            targets.append(l.getTarget())
799        return targets

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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