Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias Assign NameStore Str ClassDef bases NameLoad body Assign NameStore Call NameLoad ListLoad Num Num FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Str ListLoad Num Num decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Assign SubscriptStore AttributeLoad NameLoad attr Index Str ListComp Call NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr ListLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad
N/A N/A 
This example demonstrates creating and usind an AdvancedEffectBase. In
this case, we use it to efficiently pass the touch coordinates into the shader.
 kivy.base runTouchApp kivy.properties ListProperty kivy.lang Builder kivy.uix.effectwidget EffectWidget AdvancedEffectBase N/A effect_string 
uniform vec2 touch;

vec4 effect(vec4 color, sampler2D texture, vec2 tex_coords, vec2 coords)
{
    vec2 distance = 0.025*(coords - touch);
    float dist_mag = (distance.x*distance.x + distance.y*distance.y);
    vec3 multiplier = vec3(abs(sin(dist_mag - time)));
    return vec4(multiplier * color.xyz, 1.0);
}
 TouchEffect N/A AdvancedEffectBase N/A N/A touch N/A ListProperty N/A 0.0 0.0 __init__ N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A super TouchEffect self __init__ args kwargs N/A N/A self glsl effect_string N/A N/A self uniforms N/A touch N/A 0.0 0.0 N/A on_touch N/A N/A self N/A args kwargs N/A N/A N/A N/A self uniforms N/A touch N/A N/A float i N/A i N/A self touch N/A N/A TouchWidget N/A EffectWidget N/A __init__ N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A super TouchWidget self __init__ args kwargs N/A N/A self effect N/A TouchEffect N/A N/A self effects N/A N/A self effect N/A on_touch_down N/A N/A self touch N/A N/A N/A N/A N/A N/A super TouchWidget self on_touch_down touch N/A N/A N/A self on_touch_move touch N/A on_touch_move N/A N/A self touch N/A N/A N/A N/A N/A self effect touch N/A touch pos N/A N/A N/A root N/A N/A Builder load_string 
TouchWidget:
    Button:
        text: 'Some text!'
    Image:
        source: 'data/logo/kivy-icon-512.png'
        allow_stretch: True
        keep_ratio: False
 N/A N/A runTouchApp root