~timo-jyrinki/ubuntu/trusty/pitivi/backport_utopic_fixes

« back to all changes in this revision

Viewing changes to pitivi/ui/curve.py

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-05-26 15:29:58 UTC
  • mfrom: (3.1.20 experimental)
  • Revision ID: james.westby@ubuntu.com-20110526152958-90je1myzzjly26vw
Tags: 0.13.9.90-1ubuntu1
* Resynchronize on Debian
* debian/control:
  - Depend on python-launchpad-integration
  - Drop hal from Recommends to Suggests. This version has the patch applied
    to not crash without hal.
* debian/patches/01_lpi.patch:
  - launchpad integration  
* debian/rules:
  - Use gnome.mk so a translation template is built

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
            bounds = view.bounds
119
119
            time = (Zoomable.pixelToNs(pos[0] - bounds.x1) +
120
120
                view.element.in_point)
121
 
            value = ((1 - (pos[1] - KW_LABEL_Y_OVERFLOW - bounds.y1 - 
122
 
                view._min) / view._range) * 
 
121
            value = ((1 - (pos[1] - KW_LABEL_Y_OVERFLOW - bounds.y1 -
 
122
                view._min) / view._range) *
123
123
                    interpolator.range) + interpolator.lower
124
124
            return time, value
125
125
 
206
206
    def _getKeyframeXY(self, kf):
207
207
        interp = self.interpolator
208
208
        x = self.nsToPixel(kf.time - self.element.in_point)
209
 
        y = KW_LABEL_Y_OVERFLOW + self._range - (((kf.value - 
 
209
        y = KW_LABEL_Y_OVERFLOW + self._range - (((kf.value -
210
210
            interp.lower) / interp.range) * self._range)
211
211
        return point.Point(x + self.bounds.x1, y + self.bounds.y1 + self._min)
212
212
 
217
217
        self.keyframes[kf] = pos
218
218
 
219
219
    def do_simple_paint(self, cr, bounds):
220
 
        cr.save()
221
220
        cr.identity_matrix()
222
221
        if self.interpolator:
223
 
 
 
222
            cr.save()
224
223
            # set clipping region to the visible portion of the clip
225
224
            vis_bounds = intersect(
226
225
                goocanvas.Bounds(
267
266
                cr.clip()
268
267
 
269
268
                # draw the value label
270
 
                roundedrec(cr, x - KW_LABEL_HPAD2, y - KW_LABEL_VPAD2, 
 
269
                roundedrec(cr, x - KW_LABEL_HPAD2, y - KW_LABEL_VPAD2,
271
270
                    w + KW_LABEL_HPAD, h + KW_LABEL_VPAD, r=10)
272
271
                cr.set_source_rgb(1, 1, 1)
273
272
                cr.fill()
292
291
 
293
292
    def do_simple_is_item_at(self, x, y, cr, pointer_event):
294
293
        if (between(0, x, self.visible_width) and
295
 
            between(KW_LABEL_Y_OVERFLOW, y, self.height + 
 
294
            between(KW_LABEL_Y_OVERFLOW, y, self.height +
296
295
            KW_LABEL_Y_OVERFLOW)):
297
296
            x += self.bounds.x1
298
297
            y += self.bounds.y1