~ubuntu-branches/ubuntu/utopic/python-chaco/utopic

« back to all changes in this revision

Viewing changes to chaco/svg_graphics_context.py

  • Committer: Package Import Robot
  • Author(s): Andrew Starr-Bochicchio
  • Date: 2014-06-01 17:04:08 UTC
  • mfrom: (7.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20140601170408-m86xvdjd83a4qon0
Tags: 4.4.1-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
 - Let the binary-predeb target work on the usr/lib/python* directory
   as we don't have usr/share/pyshared anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        if not container_coords:
52
52
            x = -x
53
53
            y = -y
 
54
 
 
55
        # Compute the new x and y scale from the translation
 
56
        width, height = self.width(), self.height()
 
57
        width_scale = (width - x) / float(width)
 
58
        height_scale = (height - y) / float(height)
 
59
 
54
60
        with self:
55
61
            self.translate_ctm(x, y)
56
 
            component.draw(self, view_bounds=(0, 0, self.width(), self.height()))
 
62
            self.scale_ctm(width_scale, height_scale)
 
63
            component.draw(self, view_bounds=(0, 0, width, height))
57
64
        return
58
65
 
59
66
    def clip_to_rect(self, x, y, width, height):