--- a/tuikit/core/coords.py Wed Aug 27 23:09:53 2014 +0200
+++ b/tuikit/core/coords.py Mon Sep 01 08:45:51 2014 +0200
@@ -124,6 +124,18 @@
self.w = w
self.h = h
+ @classmethod
+ def _make(cls, origin, size):
+ """Make new Rect instance with origin and size as specified.
+
+ `origin` should be Point or pair of coordinates,
+ `size` should be Size or pair of integers
+
+ """
+ x, y = origin
+ w, h = size
+ return Rect(x, y, w, h)
+
def __repr__(self):
return 'Rect(x={0.x},y={0.y},w={0.w},h={0.h})'.format(self)