[pyclutter/wip/introspection] Convert Color.from_* functions to class methods
- From: Bastian Winkler <bwinkler src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pyclutter/wip/introspection] Convert Color.from_* functions to class methods
- Date: Sun, 13 Nov 2011 17:51:48 +0000 (UTC)
commit 41763765fc952e6c5ed3fcfe653ab314ad6d97da
Author: Bastian Winkler <buz netbuz org>
Date: Sun Nov 13 18:47:22 2011 +0100
Convert Color.from_* functions to class methods
introspection/Clutter.py | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/introspection/Clutter.py b/introspection/Clutter.py
index 1c7b065..9dfd79c 100644
--- a/introspection/Clutter.py
+++ b/introspection/Clutter.py
@@ -74,6 +74,24 @@ class Color(Clutter.Color):
else:
raise IndexError("index out of range")
+ @classmethod
+ def from_string(cls, string):
+ self = cls()
+ Clutter.Color.from_string(self, string)
+ return self
+
+ @classmethod
+ def from_hls(cls, hue, luminance, saturation):
+ self = cls()
+ Clutter.Color.from_hls(self, hue, luminance, saturation)
+ return self
+
+ @classmethod
+ def from_pixel(cls, pixel):
+ self = cls()
+ Clutter.Color.from_pixel(self, pixel)
+ return self
+
Color = override(Color)
__all__.append('Color')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]