Package pyj2d :: Module rect :: Class RectPool

Class RectPool

java.util.concurrent.ConcurrentLinkedQueue --+
                                             |
                                            RectPool

pyj2d.rect.rectPool

Rect pool accessed by rectPool instance through append method to add Rect, extend method to add Rect list, get method to return Rect set with x,y,width,height attributes, and copy method to return copy of a given Rect. If pool is empty, return is a new Rect.

Instance Methods
 
__init__(self)
 
get(self, x, y, width, height)
Return a Rect with x,y,width,height attributes.
 
copy(self, r)
Return a Rect with x,y,width,height attributes of the Rect argument.