[pitivi] ui: Remove two unused methods
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] ui: Remove two unused methods
- Date: Wed, 24 Sep 2014 17:04:56 +0000 (UTC)
commit 2c878ad4eb9eac2252b7ec4571186a57c2d722c6
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sat Apr 19 12:58:12 2014 +0200
ui: Remove two unused methods
pitivi/utils/ui.py | 30 +-----------------------------
1 files changed, 1 insertions(+), 29 deletions(-)
---
diff --git a/pitivi/utils/ui.py b/pitivi/utils/ui.py
index 62499ec..9cfd2cd 100644
--- a/pitivi/utils/ui.py
+++ b/pitivi/utils/ui.py
@@ -117,6 +117,7 @@ MONOSPACE_FONT = _get_font("monospace-font-name", "Monospace")
# ---------------------- ARGB color helper-------------------------------------#
+
def pack_color_32(red, green, blue, alpha=0xFFFF):
"""Packs the specified 16bit color values in a 32bit RGBA value."""
red = red >> 8
@@ -160,35 +161,6 @@ def unpack_color_64(value):
return red, green, blue, alpha
-def unpack_cairo_pattern(value):
- """Transforms the specified RGBA value into a SolidPattern object."""
- red, green, blue, alpha = unpack_color(value)
- return cairo.SolidPattern(
- red / 65535.0,
- green / 65535.0,
- blue / 65535.0,
- alpha / 65535.0)
-
-
-def unpack_cairo_gradient(value):
- """Creates a LinearGradient object out of the specified RGBA value."""
- red, green, blue, alpha = unpack_color(value)
- gradient = cairo.LinearGradient(0, 0, 0, 50)
- gradient.add_color_stop_rgba(
- 1.0,
- red / 65535.0,
- green / 65535.0,
- blue / 65535.0,
- alpha / 65535.0)
- gradient.add_color_stop_rgba(
- 0,
- (red / 65535.0) * 1.5,
- (green / 65535.0) * 1.5,
- (blue / 65535.0) * 1.5,
- alpha / 65535.0)
- return gradient
-
-
def hex_to_rgb(value):
return tuple(float(int(value[i:i + 2], 16)) / 255.0 for i in range(0, 6, 2))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]