-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Here are some properties and methods of an artist to control the rendering:
is_visible: if this is false, the artist is not visible on the screen. Internally, the updating should also stopped.is_updating: if this is true, the artist's drawing will update every frame; otherwise, it will remain static in the world, meaning the position/size will not changingupdate_drawing: only needs to call this method whenis_updatingis False, this will update the drawing of the artistclear: only needs to call this method whenis_updatingis False, this will clear the drawing of the artist
class IArtist(ABC):
@abstractmethod
def set_visible(self, visible: bool) -> None:
"""
Set the visibility of the artist.
Args:
visible (bool): The visibility state to set.
"""
pass
@abstractmethod
def get_visible(self) -> bool:
"""
Get the visibility of the artist.
Returns:
bool: The current visibility state of the artist.
"""
pass
@abstractmethod
def get_is_updating(self) -> bool:
"""
Get whether the artist is updating the drawing every frame.
Returns:
bool: True if the artist is updating the drawing every frame, False otherwise.
"""
pass
@abstractmethod
def set_is_updating(self, is_updating: bool) -> None:
"""
Set whether the artist is updating the drawing every frame.
Args:
is_updating(bool): The is_updating state to set.
"""
pass
@abstractmethod
def update_drawing(self) -> None:
"""
Update the drawing of the artist immediately. Should only call this method when the artist is not updating.
"""
pass
@abstractmethod
def clear(self) -> None:
"""
Clear the artist drawing immediately. Should only call this method when the artist is not updating.
"""
pass
# ...other artist APIsReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels