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 Properties

rect

color

Inherited from Artist

batch

group

count

mode

vertex_list

Public Methods:

__init__([rect, color, batch, group, usage, ...])

get_rect()

set_rect(new_rect)

update_rect()

Call this method to update the tile after you've made an in-place change to its rectangle.

get_color()

set_color(new_color)

update_color()

Inherited from Artist

__init__([rect, color, batch, group, usage, ...])

get_batch()

set_batch(new_batch)

get_group()

set_group(new_group)

get_count()

get_mode()

get_vertex_list()

hide()

show()

Inherited from HoldUpdatesMixin

__init__([rect, color, batch, group, usage, ...])

pause_updates()

resume_updates()

discard_updates()

hold_updates()

suppress_updates()

Private Methods:

_update_vertex_list()

Inherited from Artist

_create_vertex_list()

_update_vertex_list()

_group_factory(parent)

_update_group()

Inherited from HoldUpdatesMixin

_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.


__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()
_update_vertex_list()[source]
property batch
property color
property count
discard_updates()
get_batch()
get_color()[source]
get_count()
get_group()
get_mode()
get_rect()[source]
get_vertex_list()
property group
hide()
hold_updates()
property mode
pause_updates()
property rect
resume_updates()
set_batch(new_batch)
set_color(new_color)[source]
set_group(new_group)
set_rect(new_rect)[source]
show()
suppress_updates()
update_color()[source]
update_rect()[source]

Call this method to update the tile after you’ve made an in-place change to its rectangle.

property vertex_list