[pitivi] ui: Remove unused class Point



commit 27637b29799b5a0f93a3d58f5bf5ff7dc9d10a20
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Fri Jan 10 21:45:01 2014 +0100

    ui: Remove unused class Point

 pitivi/utils/ui.py |   46 ----------------------------------------------
 1 files changed, 0 insertions(+), 46 deletions(-)
---
diff --git a/pitivi/utils/ui.py b/pitivi/utils/ui.py
index e94e122..d69c4ae 100644
--- a/pitivi/utils/ui.py
+++ b/pitivi/utils/ui.py
@@ -455,49 +455,3 @@ display_aspect_ratios = model((str, object), (
     (_("Anamorphic (2.39)"), Gst.Fraction(239, 100)),
     (_("Anamorphic (2.4)"), Gst.Fraction(24, 10)),
 ))
-
-
-# ---------------------- Classes ---------------------------------------------#
-class Point(tuple):
-
-    def __new__(cls, x, y):
-        return tuple.__new__(cls, (x, y))
-
-    def __pow__(self, scalar):
-        """Returns the scalar multiple self, scalar"""
-        return Point(self[0] * scalar, self[1] * scalar)
-
-    def __rpow__(self, scalar):
-        """Returns the scalar multiple of self, scalar"""
-        return self ** scalar
-
-    def __mul__(self, p2):
-        return Point(*(a * b for a, b in izip(self, p2)))
-
-    def __div__(self, other):
-        return Point(*(a / b for a, b in izip(self, p2)))
-
-    def __floordiv__(self, scalar):
-        """Returns the scalar division of self and scalar"""
-        return Point(self[0] / scalar, self[1] / scalar)
-
-    def __add__(self, p2):
-        """Returns the 2d vector sum self + p2"""
-        return Point(*(a + b for a, b in izip(self, p2)))
-
-    def __sub__(self, p2):
-        """Returns the 2-dvector difference self - p2"""
-        return Point(*(a - b for a, b in izip(self, p2)))
-
-    def __abs__(self):
-        return Point(*(abs(a) for a in self))
-
-    @classmethod
-    def from_item_bounds(self, item):
-        bounds = item.get_bounds()
-        return Point(bounds.x1, bounds.y1), Point(bounds.x2, bounds.y2)
-
-    @classmethod
-    def from_widget_bounds(self, widget):
-        x1, y1, x2, y2 = widget.get_bounds()
-        return Point(x1, y1), Point(x2, y2)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]