[pyclutter/wip/introspection] actor-box: add with and height properties
- From: Bastian Winkler <bwinkler src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pyclutter/wip/introspection] actor-box: add with and height properties
- Date: Sun, 13 Nov 2011 17:51:58 +0000 (UTC)
commit e891b771ea0ac513b34921f5783f71f22887907d
Author: Bastian Winkler <buz netbuz org>
Date: Sun Nov 13 18:51:20 2011 +0100
actor-box: add with and height properties
introspection/Clutter.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/introspection/Clutter.py b/introspection/Clutter.py
index 2394167..a26b87e 100644
--- a/introspection/Clutter.py
+++ b/introspection/Clutter.py
@@ -152,6 +152,18 @@ class ActorBox(Clutter.ActorBox):
def __ne__(self, other):
return not self.equal(other)
+ @property
+ def size(self):
+ return (self.x2 - self.x1, self.y2 - self.y1)
+
+ @property
+ def width(self):
+ return self.x2 - self.x1
+
+ @property
+ def height(self):
+ return self.y2 - self.y1
+
ActorBox = override(ActorBox)
__all__.append('ActorBox')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]