[pitivi] Curve: invert scale on the y-axis so that up is higher
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi] Curve: invert scale on the y-axis so that up is higher
- Date: Wed, 24 Jun 2009 14:02:47 +0000 (UTC)
commit da9d67bd66f16769c19c5b69373f5bca29e11f07
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Fri Jun 12 02:21:04 2009 +0200
Curve: invert scale on the y-axis so that up is higher
pitivi/ui/curve.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/ui/curve.py b/pitivi/ui/curve.py
index b90b40c..a7ebcbc 100644
--- a/pitivi/ui/curve.py
+++ b/pitivi/ui/curve.py
@@ -89,7 +89,7 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
def xyToTimeValue(self, pos):
bounds = self._view.bounds
time = Zoomable.pixelToNs(pos[0] - bounds.x1)
- value = (pos[1] - bounds.y1) / LAYER_HEIGHT_EXPANDED
+ value = 1 - (pos[1] - bounds.y1) / LAYER_HEIGHT_EXPANDED
return time, value
def enter(self, item ,target):
@@ -160,7 +160,7 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
def _getKeyframeXY(self, kf):
x = self.nsToPixel(kf.time - self.element.in_point)
- y = kf.value * self._height
+ y = self._height - (kf.value * self._height)
return point.Point(x + self.bounds.x1, y + self.bounds.y1)
def _controlPoint(self, cr, kf):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]