glooey.drawing.artists.Rectangle¶
- class glooey.drawing.artists.Rectangle(rect=None, color='green', *, batch=None, group=None, usage='static', hidden=False)[source]¶
Bases:
glooey.drawing.artists.Artist
Public Methods:
__init__
([rect, color, batch, group, usage, ...])get_rect
()set_rect
(new_rect)Call this method to update the tile after you've made an in-place change to its rectangle.
set_color
(new_color)Inherited from
Artist
__init__
([rect, color, batch, group, usage, ...])set_batch
(new_batch)set_group
(new_group)get_mode
()hide
()show
()Inherited from
HoldUpdatesMixin
__init__
([rect, color, batch, group, usage, ...])Private Methods:
Inherited from
Artist
_group_factory
(parent)Inherited from
HoldUpdatesMixin
Return all the updates that need to be applied, from a list of all the updates that were called while the hold was active.
- __annotations__ = {}¶
- __dict__ = mappingproxy({'__module__': 'glooey.drawing.artists', '__init__': <function Rectangle.__init__>, 'get_rect': <function Rectangle.get_rect>, 'set_rect': <function Rectangle.set_rect>, 'update_rect': <function Rectangle.update_rect>, 'get_color': <function Rectangle.get_color>, 'set_color': <function Rectangle.set_color>, 'update_color': <function Rectangle.update_color>, '_update_vertex_list': <function Rectangle._update_vertex_list>, '__doc__': None, 'rect': <property object>, 'color': <property object>, '__annotations__': {}})¶
- __init__(rect=None, color='green', *, batch=None, group=None, usage='static', hidden=False)[source]¶
- __module__ = 'glooey.drawing.artists'¶
- __weakref__¶
list of weak references to the object (if defined)
- _create_vertex_list()¶
- _filter_pending_updates()¶
Return all the updates that need to be applied, from a list of all the updates that were called while the hold was active. This method is meant to be overridden by subclasses that want to customize how held updates are applied.
The
self._pending_updates
member variable is a list containing a (method, args, kwargs) tuple for each update that was called while updates were being held. This list is in the order that the updates were actually called, and any updates that were called more than once will appear in this list more than once.This method should yield or return a list of the tuples in the same format representing the updates that should be applied, in the order they should be applied. The default implementation filters out duplicate updates without changing their order. In cases where it matters, the last call to each update is used to determine the order.
- _group_factory(parent)¶
- _update_group()¶
- property batch¶
- property color¶
- property count¶
- discard_updates()¶
- get_batch()¶
- get_count()¶
- get_group()¶
- get_mode()¶
- get_vertex_list()¶
- property group¶
- hide()¶
- hold_updates()¶
- property mode¶
- pause_updates()¶
- property rect¶
- resume_updates()¶
- set_batch(new_batch)¶
- set_group(new_group)¶
- show()¶
- suppress_updates()¶
- update_rect()[source]¶
Call this method to update the tile after you’ve made an in-place change to its rectangle.
- property vertex_list¶