glooey.drawing.artists.Background¶
- class glooey.drawing.artists.Background(*, rect=None, color=None, outline=None, image=None, center=None, top=None, bottom=None, left=None, right=None, top_left=None, top_right=None, bottom_left=None, bottom_right=None, vtile='auto', htile='auto', batch=None, group=None, usage='static', hidden=False)[source]¶
Bases:
glooey.helpers.HoldUpdatesMixin
Auto-tiling: Basically the assumption is that if we specify images for one side (e.g. the top), then we will be tiling in the direction orthogonal to that side (e.g. vertically for the top).
Public Properties
Public Methods:
__init__
(*[, rect, color, outline, image, ...])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)set_outline
(new_outline)set_image
(image)set_appearance
(*[, color, outline, image, ...])set_batch
(new_batch)set_group
(new_group)set_usage
(new_usage)hide
()show
()Inherited from
HoldUpdatesMixin
__init__
(*[, rect, color, outline, image, ...])Private Methods:
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.
- __dict__ = mappingproxy({'__module__': 'glooey.drawing.artists', '__doc__': ' Auto-tiling:\n Basically the assumption is that if we specify images for one side (e.g. \n the top), then we will be tiling in the direction orthogonal to that side \n (e.g. vertically for the top).\n ', '__init__': <function Background.__init__>, '_update_group': <function Background._update_group>, '_update_tiles': <function Background._update_tiles>, 'get_rect': <function Background.get_rect>, 'set_rect': <function Background.set_rect>, 'update_rect': <function Background.update_rect>, 'get_min_size': <function Background.get_min_size>, 'get_color': <function Background.get_color>, 'set_color': <function Background.set_color>, 'get_outline': <function Background.get_outline>, 'set_outline': <function Background.set_outline>, 'set_image': <function Background.set_image>, 'get_appearance': <function Background.get_appearance>, 'set_appearance': <function Background.set_appearance>, 'get_batch': <function Background.get_batch>, 'set_batch': <function Background.set_batch>, 'get_group': <function Background.get_group>, 'set_group': <function Background.set_group>, 'get_usage': <function Background.get_usage>, 'set_usage': <function Background.set_usage>, 'is_hidden': <property object>, 'is_empty': <property object>, 'get_htile': <function Background.get_htile>, 'get_vtile': <function Background.get_vtile>, 'hide': <function Background.hide>, 'show': <function Background.show>, 'rect': <property object>, 'min_size': <property object>, 'color': <property object>, 'outline': <property object>, 'image': <property object>, 'appearance': <property object>, 'batch': <property object>, 'group': <property object>, 'usage': <property object>, 'htile': <property object>, 'vtile': <property object>, '__annotations__': {}})¶
- __init__(*, rect=None, color=None, outline=None, image=None, center=None, top=None, bottom=None, left=None, right=None, top_left=None, top_right=None, bottom_left=None, bottom_right=None, vtile='auto', htile='auto', batch=None, group=None, usage='static', hidden=False)[source]¶
- __module__ = 'glooey.drawing.artists'¶
- __weakref__¶
list of weak references to the object (if defined)
- _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.
- property appearance¶
- property batch¶
- property color¶
- discard_updates()¶
- property group¶
- hold_updates()¶
- property htile¶
- property image¶
- property is_empty¶
- property min_size¶
- property outline¶
- pause_updates()¶
- property rect¶
- resume_updates()¶
- set_appearance(*, color=None, outline=None, image=None, center=None, top=None, bottom=None, left=None, right=None, top_left=None, top_right=None, bottom_left=None, bottom_right=None, vtile='auto', htile='auto')[source]¶
- suppress_updates()¶
- update_rect()[source]¶
Call this method to update the tile after you’ve made an in-place change to its rectangle.
- property usage¶
- property vtile¶