Module Expr Str Assign NameStore TupleLoad Str Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias alias alias ImportFrom alias Assign NameStore Num ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Dict Str Str Str Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num FunctionDef arguments args NameParam NameParam defaults kwarg body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str ListLoad Num Num Num Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str If BoolOpAnd CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad NameLoad attr Str body Return AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore AttributeLoad NameLoad attr Expr Call NameLoad ListComp Call NameLoad NameLoad comprehension NameStore Call NameLoad SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad Slice Num Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Return NameLoad Return CompareIn Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Return NameLoad Return CompareLtE BinOpAdd Call NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If CompareLt NameLoad SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str NameLoad If CompareLt NameLoad SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str NameLoad If CompareGt NameLoad SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str NameLoad If CompareGt NameLoad SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str NameLoad Assign AttributeStore NameLoad attr BinOpSub SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr BinOpSub SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Call NameLoad AttributeLoad NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AugAssignSub AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body If CompareGt Call NameLoad AttributeLoad NameLoad attr Num body Return NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad ListLoad Num Num Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Num FunctionDef arguments args NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Return If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index Call NameLoad AttributeLoad NameLoad attr attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIsNot AttributeLoad NameLoad attr NameLoad body Return Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Num orelse If CompareGt AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad Call NameLoad Num Num Assign NameStore Call NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr With AttributeLoad NameLoad attr body Expr Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr keyword Str keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad keyword AttributeLoad NameLoad attr keyword TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str keyword TupleLoad BinOpSub SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str BinOpSub SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Call NameLoad AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num keyword Str keyword AttributeLoad NameLoad attr Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body If BoolOpAnd AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad body Return NameLoad Raise Call NameLoad BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body If BoolOpAnd AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpSub SubscriptLoad NameLoad Index Str NameLoad Assign NameStore BinOpSub SubscriptLoad NameLoad Index Str NameLoad Assign NameStore BinOpAdd SubscriptLoad NameLoad Index Str NameLoad Assign NameStore BinOpAdd SubscriptLoad NameLoad Index Str NameLoad If BoolOpAnd CompareLtELtE NameLoad NameLoad NameLoad CompareLtELtE NameLoad NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore CompareLt AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore BoolOpOr BoolOpAnd NameLoad NameLoad NameLoad Assign NameStore BoolOpOr BoolOpAnd NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If CompareLt SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str If CompareLt SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str If CompareGt SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str If CompareGt SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad If NameLoad body Expr Call NameLoad Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num keyword Str keyword NameLoad Expr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot Call NameLoad NameLoad Str body Return Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign AttributeStore AttributeLoad NameLoad attr attr TupleLoad BinOpSub SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str BinOpSub SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad NameLoad body If AttributeLoad NameLoad attr body Delete SubscriptDel NameLoad Index NameLoad Continue If BoolOpOr UnaryOpNot AttributeLoad NameLoad attr CompareNotEq AttributeLoad NameLoad attr Num body Continue Assign NameStore BinOpAdd AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd Call NameLoad NameLoad If BoolOpOr UnaryOpNot Call AttributeLoad NameLoad attr CompareLtE NameLoad NameLoad body Assign NameStore NameLoad If BoolOpAnd CompareLt AttributeLoad NameLoad attr Num CompareLt AttributeLoad NameLoad attr Num body Assign NameStore NameLoad orelse If Call AttributeLoad NameLoad attr body Assign NameStore NameLoad Assign NameStore NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpAdd Call NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad orelse Expr Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body Continue If CompareLtE AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr Delete SubscriptDel NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Pass decorator_list FunctionDef arguments args NameParam defaults vararg body Pass decorator_list FunctionDef arguments args NameParam defaults vararg body Pass decorator_list FunctionDef arguments args NameParam defaults vararg body Pass decorator_list FunctionDef arguments args NameParam defaults vararg body Pass decorator_list FunctionDef arguments args NameParam defaults vararg body Pass decorator_list decorator_list
N/A N/A 
Gesture Surface
===============

.. versionadded::
    1.9.0

.. warning::

    This is experimental and subject to change as long as this warning notice
    is present.

See :file:`kivy/examples/demo/multistroke/main.py` for a complete application
example.
 N/A __all__ N/A GestureSurface GestureContainer random random kivy.event EventDispatcher kivy.clock Clock kivy.vector Vector kivy.uix.floatlayout FloatLayout kivy.graphics Color Line Rectangle kivy.properties NumericProperty BooleanProperty DictProperty ListProperty colorsys hsv_to_rgb N/A UNDERSHOOT_MARGIN 0.1 GestureContainer N/A EventDispatcher N/A N/A Container object that stores information about a gesture. It has
    various properties that are updated by `GestureSurface` as drawing
    progresses.

    :Arguments:
        `touch`
            Touch object (as received by on_touch_down) used to initialize
            the gesture container. Required.

    :Properties:
        `active`
            Set to False once the gesture is complete (meets
            `max_stroke` setting or `GestureSurface.temporal_window`)

            :attr:`active` is a
            :class:`~kivy.properties.BooleanProperty`

        `active_strokes`
            Number of strokes currently active in the gesture, ie
            concurrent touches associated with this gesture.

            :attr:`active_strokes` is a
            :class:`~kivy.properties.NumericProperty`

        `max_strokes`
            Max number of strokes allowed in the gesture. This
            is set by `GestureSurface.max_strokes` but can
            be overridden for example from `on_gesture_start`.

            :attr:`max_strokes` is a
            :class:`~kivy.properties.NumericProperty`

        `was_merged`
            Indicates that this gesture has been merged with another
            gesture and should be considered discarded.

            :attr:`was_merged` is a
            :class:`~kivy.properties.BooleanProperty`

        `bbox`
            Dictionary with keys minx, miny, maxx, maxy. Represents the size
            of the gesture bounding box.

            :attr:`bbox` is a
            :class:`~kivy.properties.DictProperty`

        `width`
            Represents the width of the gesture.

            :attr:`width` is a
            :class:`~kivy.properties.NumericProperty`

        `height`
            Represents the height of the gesture.

            :attr:`height` is a
            :class:`~kivy.properties.NumericProperty`
     N/A active N/A BooleanProperty True N/A active_strokes N/A NumericProperty 0 N/A max_strokes N/A NumericProperty 0 N/A was_merged N/A BooleanProperty False N/A bbox N/A DictProperty N/A minx miny maxx maxy N/A float inf N/A float inf N/A float -inf N/A float -inf N/A width N/A NumericProperty 0 N/A height N/A NumericProperty 0 __init__ N/A N/A self touch N/A kwargs N/A N/A N/A self color N/A N/A kwargs pop color N/A 1.0 1.0 1.0 N/A N/A N/A N/A super GestureContainer self __init__ kwargs N/A N/A self id N/A str N/A touch uid N/A N/A self _create_time N/A N/A Clock get_time N/A N/A self _update_time None N/A N/A self _cleanup_time None N/A N/A self _cache_time 0 N/A N/A self _vectors None N/A N/A self _strokes N/A N/A N/A N/A self update_bbox touch N/A get_vectors N/A N/A self N/A kwargs N/A N/A Return strokes in a format that is acceptable for
        `kivy.multistroke.Recognizer` as a gesture candidate or template. The
        result is cached automatically; the cache is invalidated at the start
        and end of a stroke and if `update_bbox` is called. If you are going
        to analyze a gesture mid-stroke, you may need to set the `no_cache`
        argument to True. N/A N/A N/A N/A self _cache_time N/A self _update_time N/A N/A N/A kwargs get no_cache N/A N/A N/A self _vectors N/A vecs N/A N/A append N/A vecs append N/A N/A tuid l N/A N/A N/A self _strokes items N/A N/A lpts N/A l points N/A N/A append N/A N/A Vector pts N/A pts N/A zip N/A lpts N/A 2 N/A lpts N/A 1 2 N/A N/A self _vectors vecs N/A N/A self _cache_time N/A self _update_time N/A vecs N/A handles N/A N/A self touch N/A N/A N/A Returns True if this container handles the given touch N/A N/A N/A self active N/A N/A False N/A N/A N/A str N/A touch uid N/A self _strokes N/A accept_stroke N/A N/A self count N/A 1 N/A N/A Returns True if this container can accept `count` new strokes N/A N/A N/A self max_strokes N/A N/A True N/A N/A N/A N/A len N/A self _strokes count N/A self max_strokes N/A update_bbox N/A N/A self touch N/A N/A N/A Update gesture bbox from a touch coordinate N/A N/A x y N/A N/A touch x N/A touch y N/A bb N/A self bbox N/A N/A x N/A bb N/A minx N/A N/A N/A bb N/A minx x N/A N/A y N/A bb N/A miny N/A N/A N/A bb N/A miny y N/A N/A x N/A bb N/A maxx N/A N/A N/A bb N/A maxx x N/A N/A y N/A bb N/A maxy N/A N/A N/A bb N/A maxy y N/A N/A self width N/A N/A bb N/A maxx N/A bb N/A minx N/A N/A self height N/A N/A bb N/A maxy N/A bb N/A miny N/A N/A self _update_time N/A N/A Clock get_time N/A add_stroke N/A N/A self touch line N/A N/A N/A Associate a list of points with a touch.uid; the line itself is
        created by the caller, but subsequent move/up events look it
        up via us. This is done to avoid problems during merge. N/A N/A self _update_time N/A N/A Clock get_time N/A N/A N/A self _strokes N/A N/A str N/A touch uid line N/A N/A self active_strokes 1 N/A complete_stroke N/A N/A self N/A N/A N/A Called on touch up events to keep track of how many strokes
        are active in the gesture (we only want to dispatch event when
        the *last* stroke in the gesture is released) N/A N/A self _update_time N/A N/A Clock get_time N/A N/A self active_strokes 1 N/A single_points_test N/A N/A self N/A N/A N/A Returns True if the gesture consists only of single-point strokes,
        we must discard it in this case, or an exception will be raised N/A N/A tuid l N/A N/A N/A self _strokes items N/A N/A N/A N/A len N/A l points 2 N/A N/A False N/A True N/A N/A GestureSurface N/A FloatLayout N/A N/A Simple gesture surface to track/draw touch movements. Typically used
    to gather user input suitable for :class:`kivy.multistroke.Recognizer`.

    :Properties:
        `temporal_window`
            Time to wait from the last touch_up event before attempting
            to recognize the gesture. If you set this to 0, the
            `on_gesture_complete` event is not fired unless the
            :attr:`max_strokes` condition is met.

            :attr:`temporal_window` is a
            :class:`~kivy.properties.NumericProperty` and defaults to 2.0

        `max_strokes`
            Max number of strokes in a single gesture; if this is reached,
            recognition will start immediately on the final touch_up event.
            If this is set to 0, the `on_gesture_complete` event is not
            fired unless the :attr:`temporal_window` expires.

            :attr:`max_strokes` is a
            :class:`~kivy.properties.NumericProperty` and defaults to 2.0

        `bbox_margin`
            Bounding box margin for detecting gesture collisions, in
            pixels.

            :attr:`bbox_margin` is a
            :class:`~kivy.properties.NumericProperty` and defaults to 30

        `draw_timeout`
            Number of seconds to keep lines/bbox on canvas after the
            `on_gesture_complete` event is fired. If this is set to 0,
            gestures are immediately removed from the surface when
            complete.

            :attr:`draw_timeout` is a
            :class:`~kivy.properties.NumericProperty` and defaults to 3.0

        `color`
            Color used to draw the gesture, in RGB. This option does not
            have an effect if :attr:`use_random_color` is True.

            :attr:`draw_timeout` is a
            :class:`~kivy.properties.ListProperty` and defaults to
            [1, 1, 1] (white)

        `use_random_color`
            Set to True to pick a random color for each gesture, if you do
            this then `color` is ignored. Defaults to False.

            :attr:`use_random_color` is a
            :class:`~kivy.properties.BooleanProperty` and defaults to False

        `line_width`
            Line width used for tracing touches on the surface. Set to 0
            if you only want to detect gestures without drawing anything.
            If you use 1.0, OpenGL GL_LINE is used for drawing; values > 1
            will use an internal drawing method based on triangles (less
            efficient), see :mod:`kivy.graphics`.

            :attr:`line_width` is a
            :class:`~kivy.properties.NumericProperty` and defaults to 2

        `draw_bbox`
            Set to True if you want to draw bounding box behind gestures.
            This only works if `line_width` >= 1. Default is False.

            :attr:`draw_bbox` is a
            :class:`~kivy.properties.BooleanProperty` and defaults to True

        `bbox_alpha`
            Opacity for bounding box if `draw_bbox` is True. Default 0.1

            :attr:`bbox_alpha` is a
            :class:`~kivy.properties.NumericProperty` and defaults to 0.1

    :Events:
        `on_gesture_start` :class:`GestureContainer`
            Fired when a new gesture is initiated on the surface, ie the
            first on_touch_down that does not collide with an existing
            gesture on the surface.

        `on_gesture_extend` :class:`GestureContainer`
            Fired when a touch_down event occurs within an existing gesture.

        `on_gesture_merge` :class:`GestureContainer`, :class:`GestureContainer`
            Fired when two gestures collide and get merged to one gesture.
            The first argument is the gesture that has been merged (no longer
            valid); the second is the combined (resulting) gesture.

        `on_gesture_complete` :class:`GestureContainer`
            Fired when a set of strokes is considered a complete gesture,
            this happens when `temporal_window` expires or `max_strokes`
            is reached. Typically you will bind to this event and use
            the provided `GestureContainer` get_vectors() method to
            match against your gesture database.

        `on_gesture_cleanup` :class:`GestureContainer`
            Fired `draw_timeout` seconds after `on_gesture_complete`,
            The gesture will be removed from the canvas (if line_width > 0 or
            draw_bbox is True) and the internal gesture list before this.

        `on_gesture_discard` :class:`GestureContainer`
            Fired when a gesture does not meet the minimum size requirements
            for recognition (width/height < 5, or consists only of single-
            point strokes).
     N/A temporal_window N/A NumericProperty 2.0 N/A draw_timeout N/A NumericProperty 3.0 N/A max_strokes N/A NumericProperty 4 N/A bbox_margin N/A NumericProperty 30 N/A line_width N/A NumericProperty 2 N/A color N/A ListProperty N/A 1.0 1.0 1.0 N/A use_random_color N/A BooleanProperty False N/A draw_bbox N/A BooleanProperty False N/A bbox_alpha N/A NumericProperty 0.1 __init__ N/A N/A self N/A kwargs N/A N/A N/A N/A N/A super GestureSurface self __init__ kwargs N/A N/A self _gestures N/A N/A N/A N/A self register_event_type on_gesture_start N/A N/A N/A self register_event_type on_gesture_extend N/A N/A N/A self register_event_type on_gesture_merge N/A N/A N/A self register_event_type on_gesture_complete N/A N/A N/A self register_event_type on_gesture_cleanup N/A N/A N/A self register_event_type on_gesture_discard N/A on_touch_down N/A N/A self touch N/A N/A N/A When a new touch is registered, the first thing we do is to test if
        it collides with the bounding box of another known gesture. If so, it
        is assumed to be part of that gesture.
         N/A N/A N/A N/A self collide_point N/A touch x N/A touch y N/A N/A N/A N/A N/A touch grab self N/A g N/A N/A self find_colliding_gesture touch N/A new False N/A N/A g None N/A N/A g N/A N/A self init_gesture touch N/A new True N/A N/A N/A self init_stroke g touch N/A new N/A N/A N/A N/A self dispatch on_gesture_start g touch N/A N/A N/A N/A self dispatch on_gesture_extend g touch N/A True N/A on_touch_move N/A N/A self touch N/A N/A N/A When a touch moves, we add a point to the line on the canvas so the
        path is updated. We must also check if the new point collides with the
        bouonding box of another gesture - if so, they should be merged. N/A N/A N/A touch grab_current self N/A N/A N/A N/A N/A N/A self collide_point N/A touch y N/A touch y N/A N/A N/A g N/A N/A self get_gesture touch N/A collision N/A N/A self find_colliding_gesture touch N/A N/A N/A collision None N/A N/A g accept_stroke N/A len N/A collision _strokes N/A N/A merge N/A N/A self merge_gestures g collision N/A N/A g was_merged N/A N/A N/A N/A self dispatch on_gesture_merge g collision N/A N/A N/A N/A self dispatch on_gesture_merge collision g N/A g merge N/A N/A N/A N/A g update_bbox touch N/A N/A N/A N/A g _strokes N/A N/A str N/A touch uid points N/A N/A touch x N/A touch y N/A N/A self draw_bbox N/A N/A N/A N/A self _update_canvas_bbox g N/A True N/A on_touch_up N/A N/A self touch N/A N/A N/A N/A N/A touch grab_current self N/A N/A N/A N/A N/A touch ungrab self N/A g N/A N/A self get_gesture touch N/A N/A N/A g complete_stroke N/A N/A N/A N/A g accept_stroke N/A N/A N/A N/A self _complete_dispatcher 0 N/A N/A N/A N/A self temporal_window 0 N/A N/A N/A N/A Clock schedule_once N/A self _complete_dispatcher N/A self temporal_window N/A init_gesture N/A N/A self touch N/A N/A N/A Create a new gesture from touch, ie it's the first on
        surface, or was not close enough to any existing gesture (yet) N/A col N/A self color N/A N/A N/A self use_random_color True N/A N/A col N/A hsv_to_rgb N/A random 1.0 1.0 N/A g N/A GestureContainer touch max_strokes N/A self max_strokes color col N/A N/A self draw_bbox N/A N/A bb N/A g bbox N/A N/A self canvas N/A N/A N/A Color N/A col N/A 0 N/A col N/A 1 N/A col N/A 2 N/A self bbox_alpha mode rgba group N/A g id N/A N/A g _bbrect N/A Rectangle group N/A g id pos N/A N/A bb N/A minx N/A bb N/A miny size N/A N/A N/A bb N/A maxx N/A bb N/A minx N/A N/A bb N/A maxy N/A bb N/A miny N/A N/A N/A N/A self _gestures append g N/A g N/A init_stroke N/A N/A self g touch N/A N/A N/A l N/A N/A touch x N/A touch y N/A col N/A g color N/A new_line N/A Line points l width N/A self line_width group N/A g id N/A N/A N/A g _strokes N/A N/A str N/A touch uid new_line N/A N/A self line_width N/A N/A canvas_add N/A N/A self canvas add N/A N/A canvas_add N/A Color N/A col N/A 0 N/A col N/A 1 N/A col N/A 2 mode rgb group N/A g id N/A N/A canvas_add new_line N/A N/A N/A g update_bbox touch N/A N/A self draw_bbox N/A N/A N/A N/A self _update_canvas_bbox g N/A N/A N/A g add_stroke touch new_line N/A get_gesture N/A N/A self touch N/A N/A N/A Returns GestureContainer associated with given touch N/A g N/A self _gestures N/A N/A N/A N/A g active N/A N/A g handles touch N/A N/A g N/A N/A Exception N/A get_gesture() failed to identify  N/A str N/A touch uid N/A find_colliding_gesture N/A N/A self touch N/A N/A N/A Checks if a touch x/y collides with the bounding box of an existing
        gesture. If so, return it (otherwise returns None)
         N/A N/A touch_x touch_y N/A touch pos N/A g N/A self _gestures N/A N/A N/A N/A g active N/A N/A N/A g handles touch N/A N/A g accept_stroke N/A N/A bb N/A g bbox N/A margin N/A self bbox_margin N/A minx N/A N/A bb N/A minx margin N/A miny N/A N/A bb N/A miny margin N/A maxx N/A N/A bb N/A maxx margin N/A maxy N/A N/A bb N/A maxy margin N/A N/A N/A minx touch_x maxx N/A miny touch_y maxy N/A N/A g N/A None N/A merge_gestures N/A N/A self g other N/A N/A N/A Merges two gestures together, the oldest one is retained and the
        newer one gets the `GestureContainer.was_merged` flag raised. N/A swap N/A N/A other _create_time N/A g _create_time N/A a N/A N/A swap other g N/A b N/A N/A swap g other N/A abbox N/A a bbox N/A bbbox N/A b bbox N/A N/A N/A bbbox N/A minx N/A abbox N/A minx N/A N/A N/A abbox N/A minx N/A bbbox N/A minx N/A N/A N/A bbbox N/A miny N/A abbox N/A miny N/A N/A N/A abbox N/A miny N/A bbbox N/A miny N/A N/A N/A bbbox N/A maxx N/A abbox N/A maxx N/A N/A N/A abbox N/A maxx N/A bbbox N/A maxx N/A N/A N/A bbbox N/A maxy N/A abbox N/A maxy N/A N/A N/A abbox N/A maxy N/A bbbox N/A maxy N/A astrokes N/A a _strokes N/A lw N/A self line_width N/A a_id N/A a id N/A col N/A a color N/A N/A N/A N/A self canvas remove_group N/A b id N/A canv_add N/A N/A self canvas add N/A N/A uid old N/A N/A N/A b _strokes items N/A N/A new_line N/A Line points N/A old points width N/A old width group a_id N/A N/A astrokes N/A uid new_line N/A lw N/A N/A N/A canv_add N/A Color N/A col N/A 0 N/A col N/A 1 N/A col N/A 2 mode rgb group a_id N/A N/A canv_add new_line N/A N/A b active False N/A N/A b was_merged True N/A N/A a active_strokes N/A b active_strokes N/A N/A a _update_time N/A N/A Clock get_time N/A a N/A _update_canvas_bbox N/A N/A self g N/A N/A N/A N/A N/A hasattr g _bbrect N/A N/A N/A bb N/A g bbox N/A N/A N/A g _bbrect pos N/A N/A bb N/A minx N/A bb N/A miny N/A N/A N/A g _bbrect size N/A N/A N/A bb N/A maxx N/A bb N/A minx N/A N/A bb N/A maxy N/A bb N/A miny N/A _complete_dispatcher N/A N/A self dt N/A N/A N/A This method is scheduled on all touch up events. It will dispatch
        the `on_gesture_complete` event for all completed gestures, and remove
        merged gestures from the internal gesture list. N/A need_cleanup False N/A gest N/A self _gestures N/A timeout N/A self draw_timeout N/A twin N/A self temporal_window N/A get_time N/A Clock get_time N/A N/A idx g N/A enumerate gest N/A N/A N/A g was_merged N/A N/A N/A gest N/A idx N/A N/A N/A N/A N/A g active N/A N/A g active_strokes 0 N/A N/A N/A t1 N/A N/A g _update_time twin N/A t2 N/A N/A get_time UNDERSHOOT_MARGIN N/A N/A N/A N/A N/A g accept_stroke N/A t1 t2 N/A N/A discard False N/A N/A N/A N/A g width 5 N/A N/A g height 5 N/A N/A discard True N/A N/A N/A N/A g single_points_test N/A N/A discard True N/A need_cleanup True N/A N/A g active False N/A N/A g _cleanup_time N/A N/A get_time timeout N/A discard N/A N/A N/A N/A self dispatch on_gesture_discard g N/A N/A N/A N/A self dispatch on_gesture_complete g N/A need_cleanup N/A N/A N/A N/A Clock schedule_once N/A self _cleanup timeout N/A _cleanup N/A N/A self dt N/A N/A N/A This method is scheduled from _complete_dispatcher to clean up the
        canvas and internal gesture list after a gesture is completed. N/A m UNDERSHOOT_MARGIN N/A rg N/A N/A self canvas remove_group N/A gestures N/A self _gestures N/A N/A idx g N/A enumerate gestures N/A N/A N/A N/A g _cleanup_time None N/A N/A N/A N/A N/A g _cleanup_time N/A N/A N/A Clock get_time m N/A N/A N/A rg N/A g id N/A N/A gestures N/A idx N/A N/A N/A self dispatch on_gesture_cleanup g N/A on_gesture_start N/A N/A self N/A l N/A N/A N/A on_gesture_extend N/A N/A self N/A l N/A N/A N/A on_gesture_merge N/A N/A self N/A l N/A N/A N/A on_gesture_complete N/A N/A self N/A l N/A N/A N/A on_gesture_discard N/A N/A self N/A l N/A N/A N/A on_gesture_cleanup N/A N/A self N/A l N/A N/A N/A N/A