RenderEffects

from acron.core import RenderEffects
class RenderEffects

Bases:

Bases: TypedWritableReferenceCount

This represents a unique collection of RenderEffect objects that correspond to a particular renderable state.

You should not attempt to create or modify a RenderEffects object directly. Instead, call one of the make() functions to create one for you. And instead of modifying a RenderEffects object, create a new one.

Inheritance diagram

digraph inheritance178ad2c17f { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "RenderEffects" [URL="acron.core.RenderEffects.html#acron.core.RenderEffects",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "RenderEffects" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedWritable" [URL="acron.core.TypedWritable.html#acron.core.TypedWritable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedWritable" [arrowsize=0.75,style=""]; "TypedWritableReferenceCount" [URL="acron.core.TypedWritableReferenceCount.html#acron.core.TypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritable" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; }
__getitem__()

Returns the nth effect in the state.

Returns the effect in the state with the given type.

__lt__()
add_effect()

Returns a new RenderEffects object that represents the same as the source state, with the new RenderEffect added. If there is already a RenderEffect with the same type, it is replaced.

find_effect()

Searches for an effect with the indicated type in the state, and returns its index if it is found, or -1 if it is not.

static get_class_type()
get_effect()

Returns the nth effect in the state.

Looks for a RenderEffect of the indicated type in the state, and returns it if it is found, or NULL if it is not.

get_num_effects()

Returns the number of separate effects indicated in the state.

Deprecated: in Python, use len(effects) instead, or effects.size() in C++.

static get_num_states()

Returns the total number of unique RenderEffects objects allocated in the world. This will go up and down during normal operations.

is_empty()

Returns true if the state is empty, false otherwise.

static list_states()

Lists all of the RenderEffects in the cache to the output stream, one per line. This can be quite a lot of output if the cache is large, so be prepared.

static make()

Returns a RenderEffects with one effect set.

Returns a RenderEffects with two effects set.

Returns a RenderEffects with three effects set.

Returns a RenderEffects with four effects set.

static make_empty()

Returns a RenderEffects with no effects set.

output()
remove_effect()

Returns a new RenderEffects object that represents the same as the source state, with the indicated RenderEffect removed.

size()

Returns the number of separate effects indicated in the state.

static validate_states()

Ensures that the cache is still stored in sorted order. Returns true if so, false if there is a problem (which implies someone has modified one of the supposedly-const RenderEffects objects).

write()