/* Generated by Cython 0.14 on Wed Feb  9 18:35:18 2011 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#else

#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif

#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif

#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif

#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif

#if PY_VERSION_HEX < 0x02040000
  #define METH_COEXIST 0
  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
  #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
#endif

#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
  #define PyNumber_Index(o)    PyNumber_Int(o)
  #define PyIndex_Check(o)     PyNumber_Check(o)
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
#endif

#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)

  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;

  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)

#endif

#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
#endif

#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif

#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif

#if PY_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif

#ifndef PySet_CheckExact
#  define PySet_CheckExact(obj)          (Py_TYPE(obj) == &PySet_Type)
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject PyLongObject
#endif


#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif

#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE_API__kivy__graphics__vertex_instructions
#include "math.h"
#include "stdlib.h"
#include "string.h"
#include "gl_redirect.h"

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif


/* inline attribute */
#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

/* unused attribute */
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || defined(__INTEL_COMPILER)
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif

typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/


/* Type Conversion Predeclarations */

#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))

#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);

#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))


#ifdef __GNUC__
/* Test for GCC > 2.95 */
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
#define likely(x)   __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#else /* __GNUC__ > 2 ... */
#define likely(x)   (x)
#define unlikely(x) (x)
#endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
#define likely(x)   (x)
#define unlikely(x) (x)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "vertex_instructions.pyx",
  "buffer.pxd",
  "vbo.pxd",
  "transformation.pxd",
  "texture.pxd",
  "context_instructions.pxd",
  "compiler.pxd",
  "shader.pxd",
  "instructions.pxd",
};

/* Type declarations */

/* "/home/tito/code/kivy/kivy/graphics/vertex.pxd":3
 * from c_opengl cimport GLuint
 * 
 * cdef struct vertex_t:             # <<<<<<<<<<<<<<
 *     float x, y
 *     float s0, t0
 */

struct __pyx_t_4kivy_8graphics_6vertex_vertex_t {
  float x;
  float y;
  float s0;
  float t0;
};

/* "/home/tito/code/kivy/kivy/graphics/vertex.pxd":7
 *     float s0, t0
 * 
 * ctypedef struct vertex_attr_t:             # <<<<<<<<<<<<<<
 *     char *name
 *     unsigned int index
 */

typedef struct {
  char *name;
  unsigned int index;
  unsigned int size;
  GLuint type;
  unsigned int bytesize;
  int per_vertex;
} __pyx_t_4kivy_8graphics_6vertex_vertex_attr_t;

typedef double __pyx_t_4kivy_8graphics_14transformation_matrix_t[16];

/* "/home/tito/code/kivy/kivy/graphics/instructions.pxd":1
 * cdef class Instruction             # <<<<<<<<<<<<<<
 * cdef class InstructionGroup
 * cdef class ContextInstruction
 */

struct __pyx_obj_4kivy_8graphics_12instructions_Instruction {
  PyObject_HEAD
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Instruction *__pyx_vtab;
  int flags;
  PyObject *group;
  struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *parent;
};

/* "/home/tito/code/kivy/kivy/graphics/instructions.pxd":4
 * cdef class InstructionGroup
 * cdef class ContextInstruction
 * cdef class VertexInstruction             # <<<<<<<<<<<<<<
 * cdef class CanvasBase
 * cdef class Canvas
 */

struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction {
  struct __pyx_obj_4kivy_8graphics_12instructions_Instruction __pyx_base;
  struct __pyx_obj_4kivy_8graphics_20context_instructions_BindTexture *texture_binding;
  struct __pyx_obj_4kivy_8graphics_3vbo_VertexBatch *batch;
  PyObject *_tex_coords;
};

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":79
 * 
 * 
 * cdef class Point(VertexInstruction):             # <<<<<<<<<<<<<<
 *     '''A 2d line.
 * 
 */

struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point {
  struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction __pyx_base;
  PyObject *_points;
  float _pointsize;
};

/* "/home/tito/code/kivy/kivy/graphics/instructions.pxd":3
 * cdef class Instruction
 * cdef class InstructionGroup
 * cdef class ContextInstruction             # <<<<<<<<<<<<<<
 * cdef class VertexInstruction
 * cdef class CanvasBase
 */

struct __pyx_obj_4kivy_8graphics_12instructions_ContextInstruction {
  struct __pyx_obj_4kivy_8graphics_12instructions_Instruction __pyx_base;
  PyObject *context_state;
  PyObject *context_push;
  PyObject *context_pop;
};

/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":27
 *     cdef apply(self)
 * 
 * cdef class MatrixInstruction(ContextInstruction):             # <<<<<<<<<<<<<<
 *     cdef Matrix matrix
 *     cdef apply(self)
 */

struct __pyx_obj_4kivy_8graphics_20context_instructions_MatrixInstruction {
  struct __pyx_obj_4kivy_8graphics_12instructions_ContextInstruction __pyx_base;
  struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *matrix;
};

/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":31
 *     cdef apply(self)
 * 
 * cdef class Transform(MatrixInstruction):             # <<<<<<<<<<<<<<
 *     cpdef transform(self, Matrix trans)
 *     cpdef translate(self, float tx, float ty, float tz)
 */

struct __pyx_obj_4kivy_8graphics_20context_instructions_Transform {
  struct __pyx_obj_4kivy_8graphics_20context_instructions_MatrixInstruction __pyx_base;
};

/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":39
 *     cdef apply(self)
 * 
 * cdef class Rotate(Transform):             # <<<<<<<<<<<<<<
 *     cdef float _angle
 *     cdef tuple _axis
 */

struct __pyx_obj_4kivy_8graphics_20context_instructions_Rotate {
  struct __pyx_obj_4kivy_8graphics_20context_instructions_Transform __pyx_base;
  float _angle;
  PyObject *_axis;
};

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":319
 * 
 * 
 * cdef class Rectangle(VertexInstruction):             # <<<<<<<<<<<<<<
 *     '''A 2d rectangle.
 * 
 */

struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle {
  struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction __pyx_base;
  float x;
  float y;
  float w;
  float h;
};

/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":1
 * cdef class LineWidth             # <<<<<<<<<<<<<<
 * cdef class Color
 * cdef class BindTexture
 */

struct __pyx_obj_4kivy_8graphics_20context_instructions_LineWidth {
  struct __pyx_obj_4kivy_8graphics_12instructions_ContextInstruction __pyx_base;
};

/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":44
 *     cdef apply(self)
 * 
 * cdef class Scale(Transform):             # <<<<<<<<<<<<<<
 *     cdef float s
 *     cdef apply(self)
 */

struct __pyx_obj_4kivy_8graphics_20context_instructions_Scale {
  struct __pyx_obj_4kivy_8graphics_20context_instructions_Transform __pyx_base;
  float s;
};

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":220
 * 
 * 
 * cdef class Triangle(VertexInstruction):             # <<<<<<<<<<<<<<
 *     '''A 2d triangle.
 * 
 */

struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle {
  struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction __pyx_base;
  PyObject *_points;
};

/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":24
 *     cdef apply(self)
 * 
 * cdef class PopMatrix(ContextInstruction):             # <<<<<<<<<<<<<<
 *     cdef apply(self)
 * 
 */

struct __pyx_obj_4kivy_8graphics_20context_instructions_PopMatrix {
  struct __pyx_obj_4kivy_8graphics_12instructions_ContextInstruction __pyx_base;
};

/* "/home/tito/code/kivy/kivy/graphics/instructions.pxd":2
 * cdef class Instruction
 * cdef class InstructionGroup             # <<<<<<<<<<<<<<
 * cdef class ContextInstruction
 * cdef class VertexInstruction
 */

struct __pyx_obj_4kivy_8graphics_12instructions_InstructionGroup {
  struct __pyx_obj_4kivy_8graphics_12instructions_Instruction __pyx_base;
  PyObject *children;
  struct __pyx_obj_4kivy_8graphics_12instructions_InstructionGroup *compiled_children;
  struct __pyx_obj_4kivy_8graphics_8compiler_GraphicsCompiler *compiler;
};

/* "/home/tito/code/kivy/kivy/graphics/instructions.pxd":5
 * cdef class ContextInstruction
 * cdef class VertexInstruction
 * cdef class CanvasBase             # <<<<<<<<<<<<<<
 * cdef class Canvas
 * cdef class RenderContext
 */

struct __pyx_obj_4kivy_8graphics_12instructions_CanvasBase {
  struct __pyx_obj_4kivy_8graphics_12instructions_InstructionGroup __pyx_base;
};

/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":21
 * 
 * 
 * cdef class PushMatrix(ContextInstruction):             # <<<<<<<<<<<<<<
 *     cdef apply(self)
 * 
 */

struct __pyx_obj_4kivy_8graphics_20context_instructions_PushMatrix {
  struct __pyx_obj_4kivy_8graphics_12instructions_ContextInstruction __pyx_base;
};

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":393
 * 
 * 
 * cdef class BorderImage(Rectangle):             # <<<<<<<<<<<<<<
 *     '''A 2d border image. The behavior of the border image is similar to the
 *     concept of CSS3 border-image.
 */

struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle __pyx_base;
  PyObject *_border;
};

/* "/home/tito/code/kivy/kivy/graphics/vbo.pxd":8
 * cdef vertex_attr_t *vbo_vertex_attr_list()
 * 
 * cdef class VBO:             # <<<<<<<<<<<<<<
 *     cdef GLuint id
 *     cdef int usage
 */

struct __pyx_obj_4kivy_8graphics_3vbo_VBO {
  PyObject_HEAD
  struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VBO *__pyx_vtab;
  GLuint id;
  int usage;
  int target;
  __pyx_t_4kivy_8graphics_6vertex_vertex_attr_t *format;
  int format_count;
  struct __pyx_obj_4kivy_8graphics_6buffer_Buffer *data;
  int need_upload;
  int vbo_size;
};

/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":50
 * 
 * 
 * cdef class Translate(Transform):             # <<<<<<<<<<<<<<
 *     cdef float _x, _y, _z
 *     cdef apply(self)
 */

struct __pyx_obj_4kivy_8graphics_20context_instructions_Translate {
  struct __pyx_obj_4kivy_8graphics_20context_instructions_Transform __pyx_base;
  float _x;
  float _y;
  float _z;
};

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":267
 * 
 * 
 * cdef class Quad(VertexInstruction):             # <<<<<<<<<<<<<<
 *     '''A 2d quad.
 * 
 */

struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad {
  struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction __pyx_base;
  PyObject *_points;
};

/* "/home/tito/code/kivy/kivy/graphics/vbo.pxd":27
 * 
 * 
 * cdef class VertexBatch:             # <<<<<<<<<<<<<<
 *     cdef VBO vbo
 *     cdef Buffer elements
 */

struct __pyx_obj_4kivy_8graphics_3vbo_VertexBatch {
  PyObject_HEAD
  struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VertexBatch *__pyx_vtab;
  struct __pyx_obj_4kivy_8graphics_3vbo_VBO *vbo;
  struct __pyx_obj_4kivy_8graphics_6buffer_Buffer *elements;
  struct __pyx_obj_4kivy_8graphics_6buffer_Buffer *vbo_index;
  GLuint mode;
  struct __pyx_t_4kivy_8graphics_6vertex_vertex_t *vertices;
  int vertices_count;
  int *indices;
  int indices_count;
};

/* "/home/tito/code/kivy/kivy/graphics/shader.pxd":5
 * from transformation cimport Matrix
 * 
 * cdef class Shader:             # <<<<<<<<<<<<<<
 *     cdef int program
 *     cdef int vertex_shader
 */

struct __pyx_obj_4kivy_8graphics_6shader_Shader {
  PyObject_HEAD
  struct __pyx_vtabstruct_4kivy_8graphics_6shader_Shader *__pyx_vtab;
  int program;
  int vertex_shader;
  int fragment_shader;
  PyObject *vert_src;
  PyObject *frag_src;
  PyObject *uniform_locations;
  PyObject *uniform_values;
};

/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":3
 * cdef class LineWidth
 * cdef class Color
 * cdef class BindTexture             # <<<<<<<<<<<<<<
 * 
 * from transformation cimport Matrix
 */

struct __pyx_obj_4kivy_8graphics_20context_instructions_BindTexture {
  struct __pyx_obj_4kivy_8graphics_12instructions_ContextInstruction __pyx_base;
  PyObject *_source;
  struct __pyx_obj_4kivy_8graphics_7texture_Texture *_texture;
};

/* "/home/tito/code/kivy/kivy/graphics/instructions.pxd":6
 * cdef class VertexInstruction
 * cdef class CanvasBase
 * cdef class Canvas             # <<<<<<<<<<<<<<
 * cdef class RenderContext
 * 
 */

struct __pyx_obj_4kivy_8graphics_12instructions_Canvas {
  struct __pyx_obj_4kivy_8graphics_12instructions_CanvasBase __pyx_base;
  struct __pyx_obj_4kivy_8graphics_12instructions_CanvasBase *_before;
  struct __pyx_obj_4kivy_8graphics_12instructions_CanvasBase *_after;
};

/* "/home/tito/code/kivy/kivy/graphics/instructions.pxd":7
 * cdef class CanvasBase
 * cdef class Canvas
 * cdef class RenderContext             # <<<<<<<<<<<<<<
 * 
 * from vbo cimport *
 */

struct __pyx_obj_4kivy_8graphics_12instructions_RenderContext {
  struct __pyx_obj_4kivy_8graphics_12instructions_Canvas __pyx_base;
  struct __pyx_obj_4kivy_8graphics_6shader_Shader *shader;
  PyObject *state_stacks;
  struct __pyx_obj_4kivy_8graphics_7texture_Texture *default_texture;
  PyObject *bind_texture;
};

/* "/home/tito/code/kivy/kivy/graphics/buffer.pxd":1
 * cdef class Buffer:             # <<<<<<<<<<<<<<
 *     cdef void *data
 *     cdef list l_free
 */

struct __pyx_obj_4kivy_8graphics_6buffer_Buffer {
  PyObject_HEAD
  struct __pyx_vtabstruct_4kivy_8graphics_6buffer_Buffer *__pyx_vtab;
  void *data;
  PyObject *l_free;
  int block_size;
  int block_count;
  int need_pack;
};

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":25
 * from kivy.logger import Logger
 * 
 * cdef class Line(VertexInstruction):             # <<<<<<<<<<<<<<
 *     '''A 2d line.
 * 
 */

struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line {
  struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction __pyx_base;
  PyObject *_points;
};

/* "/home/tito/code/kivy/kivy/graphics/transformation.pxd":3
 * ctypedef double matrix_t[16]
 * 
 * cdef class Matrix:             # <<<<<<<<<<<<<<
 *     cdef matrix_t mat
 *     cpdef Matrix identity(self)
 */

struct __pyx_obj_4kivy_8graphics_14transformation_Matrix {
  PyObject_HEAD
  struct __pyx_vtabstruct_4kivy_8graphics_14transformation_Matrix *__pyx_vtab;
  __pyx_t_4kivy_8graphics_14transformation_matrix_t mat;
};

struct __pyx_obj_4kivy_8graphics_7texture_Texture {
  PyObject_HEAD
  struct __pyx_vtabstruct_4kivy_8graphics_7texture_Texture *__pyx_vtab;
  float _tex_coords[8];
  int _width;
  int _height;
  GLuint _target;
  GLuint _id;
  int _mipmap;
  GLuint _gl_wrap;
  GLuint _gl_min_filter;
  GLuint _gl_mag_filter;
  int _rectangle;
  PyObject *_colorfmt;
  float _uvx;
  float _uvy;
  float _uvw;
  float _uvh;
};

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":512
 * 
 * 
 * cdef class Ellipse(Rectangle):             # <<<<<<<<<<<<<<
 *     '''A 2d ellipse.
 * 
 */

struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Ellipse {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle __pyx_base;
  int _segments;
};

/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":2
 * cdef class LineWidth
 * cdef class Color             # <<<<<<<<<<<<<<
 * cdef class BindTexture
 * 
 */

struct __pyx_obj_4kivy_8graphics_20context_instructions_Color {
  struct __pyx_obj_4kivy_8graphics_12instructions_ContextInstruction __pyx_base;
};

/* "/home/tito/code/kivy/kivy/graphics/compiler.pxd":1
 * cdef class GraphicsCompiler             # <<<<<<<<<<<<<<
 * 
 * from instructions cimport InstructionGroup
 */

struct __pyx_obj_4kivy_8graphics_8compiler_GraphicsCompiler {
  PyObject_HEAD
  struct __pyx_vtabstruct_4kivy_8graphics_8compiler_GraphicsCompiler *__pyx_vtab;
};


struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Instruction {
  PyObject *(*apply)(struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *);
  PyObject *(*flag_update)(struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *);
  PyObject *(*flag_update_done)(struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *);
};
static struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Instruction *__pyx_vtabptr_4kivy_8graphics_12instructions_Instruction;


/* "/home/tito/code/kivy/kivy/graphics/instructions.pxd":4
 * cdef class InstructionGroup
 * cdef class ContextInstruction
 * cdef class VertexInstruction             # <<<<<<<<<<<<<<
 * cdef class CanvasBase
 * cdef class Canvas
 */

struct __pyx_vtabstruct_4kivy_8graphics_12instructions_VertexInstruction {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Instruction __pyx_base;
  void (*build)(struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction *);
};
static struct __pyx_vtabstruct_4kivy_8graphics_12instructions_VertexInstruction *__pyx_vtabptr_4kivy_8graphics_12instructions_VertexInstruction;


/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":319
 * 
 * 
 * cdef class Rectangle(VertexInstruction):             # <<<<<<<<<<<<<<
 *     '''A 2d rectangle.
 * 
 */

struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Rectangle {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_VertexInstruction __pyx_base;
};
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Rectangle *__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Rectangle;


/* "/home/tito/code/kivy/kivy/graphics/instructions.pxd":3
 * cdef class Instruction
 * cdef class InstructionGroup
 * cdef class ContextInstruction             # <<<<<<<<<<<<<<
 * cdef class VertexInstruction
 * cdef class CanvasBase
 */

struct __pyx_vtabstruct_4kivy_8graphics_12instructions_ContextInstruction {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Instruction __pyx_base;
  struct __pyx_obj_4kivy_8graphics_12instructions_RenderContext *(*get_context)(struct __pyx_obj_4kivy_8graphics_12instructions_ContextInstruction *);
  PyObject *(*set_state)(struct __pyx_obj_4kivy_8graphics_12instructions_ContextInstruction *, PyObject *, PyObject *);
  PyObject *(*push_state)(struct __pyx_obj_4kivy_8graphics_12instructions_ContextInstruction *, PyObject *);
  PyObject *(*pop_state)(struct __pyx_obj_4kivy_8graphics_12instructions_ContextInstruction *, PyObject *);
};
static struct __pyx_vtabstruct_4kivy_8graphics_12instructions_ContextInstruction *__pyx_vtabptr_4kivy_8graphics_12instructions_ContextInstruction;


/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":21
 * 
 * 
 * cdef class PushMatrix(ContextInstruction):             # <<<<<<<<<<<<<<
 *     cdef apply(self)
 * 
 */

struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_PushMatrix {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_ContextInstruction __pyx_base;
  PyObject *(*apply)(struct __pyx_obj_4kivy_8graphics_20context_instructions_PushMatrix *);
};
static struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_PushMatrix *__pyx_vtabptr_4kivy_8graphics_20context_instructions_PushMatrix;


/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":27
 *     cdef apply(self)
 * 
 * cdef class MatrixInstruction(ContextInstruction):             # <<<<<<<<<<<<<<
 *     cdef Matrix matrix
 *     cdef apply(self)
 */

struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_MatrixInstruction {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_ContextInstruction __pyx_base;
  PyObject *(*apply)(struct __pyx_obj_4kivy_8graphics_20context_instructions_MatrixInstruction *);
};
static struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_MatrixInstruction *__pyx_vtabptr_4kivy_8graphics_20context_instructions_MatrixInstruction;


/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":31
 *     cdef apply(self)
 * 
 * cdef class Transform(MatrixInstruction):             # <<<<<<<<<<<<<<
 *     cpdef transform(self, Matrix trans)
 *     cpdef translate(self, float tx, float ty, float tz)
 */

struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_Transform {
  struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_MatrixInstruction __pyx_base;
  PyObject *(*transform)(struct __pyx_obj_4kivy_8graphics_20context_instructions_Transform *, struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *, int __pyx_skip_dispatch);
  PyObject *(*translate)(struct __pyx_obj_4kivy_8graphics_20context_instructions_Transform *, float, float, float, int __pyx_skip_dispatch);
  PyObject *(*rotate)(struct __pyx_obj_4kivy_8graphics_20context_instructions_Transform *, float, float, float, float, int __pyx_skip_dispatch);
  PyObject *(*scale)(struct __pyx_obj_4kivy_8graphics_20context_instructions_Transform *, float, int __pyx_skip_dispatch);
  PyObject *(*identity)(struct __pyx_obj_4kivy_8graphics_20context_instructions_Transform *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_Transform *__pyx_vtabptr_4kivy_8graphics_20context_instructions_Transform;


/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":50
 * 
 * 
 * cdef class Translate(Transform):             # <<<<<<<<<<<<<<
 *     cdef float _x, _y, _z
 *     cdef apply(self)
 */

struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_Translate {
  struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_Transform __pyx_base;
};
static struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_Translate *__pyx_vtabptr_4kivy_8graphics_20context_instructions_Translate;


/* "/home/tito/code/kivy/kivy/graphics/vbo.pxd":27
 * 
 * 
 * cdef class VertexBatch:             # <<<<<<<<<<<<<<
 *     cdef VBO vbo
 *     cdef Buffer elements
 */

struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VertexBatch {
  void (*set_data)(struct __pyx_obj_4kivy_8graphics_3vbo_VertexBatch *, struct __pyx_t_4kivy_8graphics_6vertex_vertex_t *, int, int *, int);
  void (*append_data)(struct __pyx_obj_4kivy_8graphics_3vbo_VertexBatch *, struct __pyx_t_4kivy_8graphics_6vertex_vertex_t *, int, int *, int);
  void (*draw)(struct __pyx_obj_4kivy_8graphics_3vbo_VertexBatch *);
  void (*set_mode)(struct __pyx_obj_4kivy_8graphics_3vbo_VertexBatch *, PyObject *);
};
static struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VertexBatch *__pyx_vtabptr_4kivy_8graphics_3vbo_VertexBatch;


/* "/home/tito/code/kivy/kivy/graphics/instructions.pxd":2
 * cdef class Instruction
 * cdef class InstructionGroup             # <<<<<<<<<<<<<<
 * cdef class ContextInstruction
 * cdef class VertexInstruction
 */

struct __pyx_vtabstruct_4kivy_8graphics_12instructions_InstructionGroup {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Instruction __pyx_base;
  void (*build)(struct __pyx_obj_4kivy_8graphics_12instructions_InstructionGroup *);
  PyObject *(*add)(struct __pyx_obj_4kivy_8graphics_12instructions_InstructionGroup *, struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_4kivy_8graphics_12instructions_InstructionGroup *, int, struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_4kivy_8graphics_12instructions_InstructionGroup *, struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *, int __pyx_skip_dispatch);
  PyObject *(*clear)(struct __pyx_obj_4kivy_8graphics_12instructions_InstructionGroup *, int __pyx_skip_dispatch);
  PyObject *(*remove_group)(struct __pyx_obj_4kivy_8graphics_12instructions_InstructionGroup *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*get_group)(struct __pyx_obj_4kivy_8graphics_12instructions_InstructionGroup *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_4kivy_8graphics_12instructions_InstructionGroup *__pyx_vtabptr_4kivy_8graphics_12instructions_InstructionGroup;


/* "/home/tito/code/kivy/kivy/graphics/instructions.pxd":5
 * cdef class ContextInstruction
 * cdef class VertexInstruction
 * cdef class CanvasBase             # <<<<<<<<<<<<<<
 * cdef class Canvas
 * cdef class RenderContext
 */

struct __pyx_vtabstruct_4kivy_8graphics_12instructions_CanvasBase {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_InstructionGroup __pyx_base;
};
static struct __pyx_vtabstruct_4kivy_8graphics_12instructions_CanvasBase *__pyx_vtabptr_4kivy_8graphics_12instructions_CanvasBase;


/* "/home/tito/code/kivy/kivy/graphics/instructions.pxd":6
 * cdef class VertexInstruction
 * cdef class CanvasBase
 * cdef class Canvas             # <<<<<<<<<<<<<<
 * cdef class RenderContext
 * 
 */

struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Canvas {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_CanvasBase __pyx_base;
  PyObject *(*draw)(struct __pyx_obj_4kivy_8graphics_12instructions_Canvas *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Canvas *__pyx_vtabptr_4kivy_8graphics_12instructions_Canvas;


/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":220
 * 
 * 
 * cdef class Triangle(VertexInstruction):             # <<<<<<<<<<<<<<
 *     '''A 2d triangle.
 * 
 */

struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Triangle {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_VertexInstruction __pyx_base;
};
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Triangle *__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Triangle;


/* "/home/tito/code/kivy/kivy/graphics/transformation.pxd":3
 * ctypedef double matrix_t[16]
 * 
 * cdef class Matrix:             # <<<<<<<<<<<<<<
 *     cdef matrix_t mat
 *     cpdef Matrix identity(self)
 */

struct __pyx_vtabstruct_4kivy_8graphics_14transformation_Matrix {
  struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *(*identity)(struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *, int __pyx_skip_dispatch);
  struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *(*inverse)(struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *, int __pyx_skip_dispatch);
  struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *(*multiply)(struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *, struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *, int __pyx_skip_dispatch);
  struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *(*rotate)(struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *, double, double, double, double, int __pyx_skip_dispatch);
  struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *(*scale)(struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *, double, double, double, int __pyx_skip_dispatch);
  struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *(*translate)(struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *, double, double, double, int __pyx_skip_dispatch);
  struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *(*view_clip)(struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *, double, double, double, double, double, double, int, int __pyx_skip_dispatch);
  PyObject *(*transform_point)(struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *, double, double, double, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_4kivy_8graphics_14transformation_Matrix *__pyx_vtabptr_4kivy_8graphics_14transformation_Matrix;


struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_BindTexture {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_ContextInstruction __pyx_base;
  PyObject *(*apply)(struct __pyx_obj_4kivy_8graphics_20context_instructions_BindTexture *);
};
static struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_BindTexture *__pyx_vtabptr_4kivy_8graphics_20context_instructions_BindTexture;


/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":1
 * cdef class LineWidth             # <<<<<<<<<<<<<<
 * cdef class Color
 * cdef class BindTexture
 */

struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_LineWidth {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_ContextInstruction __pyx_base;
  PyObject *(*apply)(struct __pyx_obj_4kivy_8graphics_20context_instructions_LineWidth *);
};
static struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_LineWidth *__pyx_vtabptr_4kivy_8graphics_20context_instructions_LineWidth;


/* "/home/tito/code/kivy/kivy/graphics/shader.pxd":5
 * from transformation cimport Matrix
 * 
 * cdef class Shader:             # <<<<<<<<<<<<<<
 *     cdef int program
 *     cdef int vertex_shader
 */

struct __pyx_vtabstruct_4kivy_8graphics_6shader_Shader {
  void (*use)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *);
  void (*stop)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *);
  void (*set_uniform)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *, PyObject *, PyObject *);
  void (*upload_uniform)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *, PyObject *, PyObject *);
  void (*upload_uniform_matrix)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *, PyObject *, struct __pyx_obj_4kivy_8graphics_14transformation_Matrix *);
  int (*get_uniform_loc)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *, PyObject *);
  void (*bind_attrib_locations)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *);
  void (*build)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *);
  int (*is_linked)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *);
  GLuint (*compile_shader)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *, char *, PyObject *);
  PyObject *(*get_shader_log)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *, PyObject *);
  PyObject *(*get_program_log)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *, PyObject *);
  void (*process_build_log)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *);
  void (*process_message)(struct __pyx_obj_4kivy_8graphics_6shader_Shader *, PyObject *, PyObject *);
};
static struct __pyx_vtabstruct_4kivy_8graphics_6shader_Shader *__pyx_vtabptr_4kivy_8graphics_6shader_Shader;


/* "/home/tito/code/kivy/kivy/graphics/instructions.pxd":7
 * cdef class CanvasBase
 * cdef class Canvas
 * cdef class RenderContext             # <<<<<<<<<<<<<<
 * 
 * from vbo cimport *
 */

struct __pyx_vtabstruct_4kivy_8graphics_12instructions_RenderContext {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Canvas __pyx_base;
  PyObject *(*set_texture)(struct __pyx_obj_4kivy_8graphics_12instructions_RenderContext *, int, struct __pyx_obj_4kivy_8graphics_7texture_Texture *);
  PyObject *(*set_state)(struct __pyx_obj_4kivy_8graphics_12instructions_RenderContext *, PyObject *, PyObject *);
  PyObject *(*get_state)(struct __pyx_obj_4kivy_8graphics_12instructions_RenderContext *, PyObject *);
  PyObject *(*set_states)(struct __pyx_obj_4kivy_8graphics_12instructions_RenderContext *, PyObject *);
  PyObject *(*push_state)(struct __pyx_obj_4kivy_8graphics_12instructions_RenderContext *, PyObject *);
  PyObject *(*push_states)(struct __pyx_obj_4kivy_8graphics_12instructions_RenderContext *, PyObject *);
  PyObject *(*pop_state)(struct __pyx_obj_4kivy_8graphics_12instructions_RenderContext *, PyObject *);
  PyObject *(*pop_states)(struct __pyx_obj_4kivy_8graphics_12instructions_RenderContext *, PyObject *);
  PyObject *(*enter)(struct __pyx_obj_4kivy_8graphics_12instructions_RenderContext *);
};
static struct __pyx_vtabstruct_4kivy_8graphics_12instructions_RenderContext *__pyx_vtabptr_4kivy_8graphics_12instructions_RenderContext;


/* "/home/tito/code/kivy/kivy/graphics/vbo.pxd":8
 * cdef vertex_attr_t *vbo_vertex_attr_list()
 * 
 * cdef class VBO:             # <<<<<<<<<<<<<<
 *     cdef GLuint id
 *     cdef int usage
 */

struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VBO {
  void (*allocate_buffer)(struct __pyx_obj_4kivy_8graphics_3vbo_VBO *);
  void (*update_buffer)(struct __pyx_obj_4kivy_8graphics_3vbo_VBO *);
  void (*bind)(struct __pyx_obj_4kivy_8graphics_3vbo_VBO *);
  void (*unbind)(struct __pyx_obj_4kivy_8graphics_3vbo_VBO *);
  void (*add_vertex_data)(struct __pyx_obj_4kivy_8graphics_3vbo_VBO *, void *, int *, int);
  void (*update_vertex_data)(struct __pyx_obj_4kivy_8graphics_3vbo_VBO *, int, struct __pyx_t_4kivy_8graphics_6vertex_vertex_t *, int);
  void (*remove_vertex_data)(struct __pyx_obj_4kivy_8graphics_3vbo_VBO *, int *, int);
};
static struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VBO *__pyx_vtabptr_4kivy_8graphics_3vbo_VBO;


/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":39
 *     cdef apply(self)
 * 
 * cdef class Rotate(Transform):             # <<<<<<<<<<<<<<
 *     cdef float _angle
 *     cdef tuple _axis
 */

struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_Rotate {
  struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_Transform __pyx_base;
};
static struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_Rotate *__pyx_vtabptr_4kivy_8graphics_20context_instructions_Rotate;


/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":24
 *     cdef apply(self)
 * 
 * cdef class PopMatrix(ContextInstruction):             # <<<<<<<<<<<<<<
 *     cdef apply(self)
 * 
 */

struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_PopMatrix {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_ContextInstruction __pyx_base;
  PyObject *(*apply)(struct __pyx_obj_4kivy_8graphics_20context_instructions_PopMatrix *);
};
static struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_PopMatrix *__pyx_vtabptr_4kivy_8graphics_20context_instructions_PopMatrix;


/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":79
 * 
 * 
 * cdef class Point(VertexInstruction):             # <<<<<<<<<<<<<<
 *     '''A 2d line.
 * 
 */

struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Point {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_VertexInstruction __pyx_base;
};
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Point *__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Point;


/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":25
 * from kivy.logger import Logger
 * 
 * cdef class Line(VertexInstruction):             # <<<<<<<<<<<<<<
 *     '''A 2d line.
 * 
 */

struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Line {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_VertexInstruction __pyx_base;
};
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Line *__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Line;


/* "/home/tito/code/kivy/kivy/graphics/texture.pxd":3
 * from c_opengl cimport GLuint
 * 
 * cdef class Texture:             # <<<<<<<<<<<<<<
 *     cdef float _tex_coords[8]
 *     cdef int _width
 */

struct __pyx_vtabstruct_4kivy_8graphics_7texture_Texture {
  PyObject *(*update_tex_coords)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *);
  PyObject *(*release)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *);
  PyObject *(*flip_vertical)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *, int __pyx_skip_dispatch);
  PyObject *(*get_region)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*bind)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *, int __pyx_skip_dispatch);
  PyObject *(*enable)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *, int __pyx_skip_dispatch);
  PyObject *(*disable)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_4kivy_8graphics_7texture_Texture *__pyx_vtabptr_4kivy_8graphics_7texture_Texture;


/* "/home/tito/code/kivy/kivy/graphics/compiler.pxd":1
 * cdef class GraphicsCompiler             # <<<<<<<<<<<<<<
 * 
 * from instructions cimport InstructionGroup
 */

struct __pyx_vtabstruct_4kivy_8graphics_8compiler_GraphicsCompiler {
  struct __pyx_obj_4kivy_8graphics_12instructions_InstructionGroup *(*compile)(struct __pyx_obj_4kivy_8graphics_8compiler_GraphicsCompiler *, struct __pyx_obj_4kivy_8graphics_12instructions_InstructionGroup *);
};
static struct __pyx_vtabstruct_4kivy_8graphics_8compiler_GraphicsCompiler *__pyx_vtabptr_4kivy_8graphics_8compiler_GraphicsCompiler;


/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":2
 * cdef class LineWidth
 * cdef class Color             # <<<<<<<<<<<<<<
 * cdef class BindTexture
 * 
 */

struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_Color {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_ContextInstruction __pyx_base;
  PyObject *(*apply)(struct __pyx_obj_4kivy_8graphics_20context_instructions_Color *);
};
static struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_Color *__pyx_vtabptr_4kivy_8graphics_20context_instructions_Color;


/* "/home/tito/code/kivy/kivy/graphics/context_instructions.pxd":44
 *     cdef apply(self)
 * 
 * cdef class Scale(Transform):             # <<<<<<<<<<<<<<
 *     cdef float s
 *     cdef apply(self)
 */

struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_Scale {
  struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_Transform __pyx_base;
};
static struct __pyx_vtabstruct_4kivy_8graphics_20context_instructions_Scale *__pyx_vtabptr_4kivy_8graphics_20context_instructions_Scale;


/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":267
 * 
 * 
 * cdef class Quad(VertexInstruction):             # <<<<<<<<<<<<<<
 *     '''A 2d quad.
 * 
 */

struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Quad {
  struct __pyx_vtabstruct_4kivy_8graphics_12instructions_VertexInstruction __pyx_base;
};
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Quad *__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Quad;


/* "/home/tito/code/kivy/kivy/graphics/buffer.pxd":1
 * cdef class Buffer:             # <<<<<<<<<<<<<<
 *     cdef void *data
 *     cdef list l_free
 */

struct __pyx_vtabstruct_4kivy_8graphics_6buffer_Buffer {
  void (*clear)(struct __pyx_obj_4kivy_8graphics_6buffer_Buffer *);
  void (*grow)(struct __pyx_obj_4kivy_8graphics_6buffer_Buffer *, int);
  void (*add)(struct __pyx_obj_4kivy_8graphics_6buffer_Buffer *, void *, int *, int);
  void (*remove)(struct __pyx_obj_4kivy_8graphics_6buffer_Buffer *, int *, int);
  void (*pack)(struct __pyx_obj_4kivy_8graphics_6buffer_Buffer *);
  int (*count)(struct __pyx_obj_4kivy_8graphics_6buffer_Buffer *);
  int (*size)(struct __pyx_obj_4kivy_8graphics_6buffer_Buffer *);
  void *(*pointer)(struct __pyx_obj_4kivy_8graphics_6buffer_Buffer *);
  void *(*offset_pointer)(struct __pyx_obj_4kivy_8graphics_6buffer_Buffer *, int);
  void (*update)(struct __pyx_obj_4kivy_8graphics_6buffer_Buffer *, int, void *, int);
};
static struct __pyx_vtabstruct_4kivy_8graphics_6buffer_Buffer *__pyx_vtabptr_4kivy_8graphics_6buffer_Buffer;


/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":393
 * 
 * 
 * cdef class BorderImage(Rectangle):             # <<<<<<<<<<<<<<
 *     '''A 2d border image. The behavior of the border image is similar to the
 *     concept of CSS3 border-image.
 */

struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_BorderImage {
  struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Rectangle __pyx_base;
};
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_BorderImage *__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_BorderImage;


/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":512
 * 
 * 
 * cdef class Ellipse(Rectangle):             # <<<<<<<<<<<<<<
 *     '''A 2d ellipse.
 * 
 */

struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Ellipse {
  struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Rectangle __pyx_base;
};
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Ellipse *__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Ellipse;

#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif

#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
  end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
  }
  #define __Pyx_RefNannySetupContext(name)           void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
  #define __Pyx_RefNannyFinishContext()           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
#else
  #define __Pyx_RefNannySetupContext(name)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
#endif /* CYTHON_REFNANNY */
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict,
    const char* function_name, int kw_allowed); /*proto*/

static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        /* these presumably have safe hash functions */
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    } else {
        PyObject *m;
        m = __Pyx_GetAttrString(d, "get");
        if (!m) return NULL;
        value = PyObject_CallFunctionObjArgs(m, key,
            (default_value == Py_None) ? NULL : default_value, NULL);
        Py_DECREF(m);
    }
#endif
    return value;
}

static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */


static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}


#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
    if (likely(o != Py_None)) {
        if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
            PyObject *r = PyList_GET_ITEM(o, i);
            Py_INCREF(r);
            return r;
        }
        else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
            PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
            Py_INCREF(r);
            return r;
        }
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
    if (likely(o != Py_None)) {
        if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, i);
            Py_INCREF(r);
            return r;
        }
        else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
            PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
            Py_INCREF(r);
            return r;
        }
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}


#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
    PyObject *r;
    if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
    }
    else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
    }
    else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
        r = PySequence_GetItem(o, i);
    }
    else {
        r = __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
    }
    return r;
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
static int __Pyx_EndUnpack(PyObject *, Py_ssize_t expected); /*proto*/

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name, PyObject* kw_name); /*proto*/

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/

static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

static void __Pyx_WriteUnraisable(const char *name); /*proto*/

static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict);  /*proto*/

static PyObject *__Pyx_ImportModule(const char *name); /*proto*/

static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/

static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/

static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/

static void __Pyx_AddTraceback(const char *funcname); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
/* Module declarations from kivy.graphics.buffer */

static PyTypeObject *__pyx_ptype_4kivy_8graphics_6buffer_Buffer = 0;
/* Module declarations from kivy.graphics.c_opengl */

/* Module declarations from kivy.graphics.vertex */

/* Module declarations from kivy.graphics.vbo */

static PyTypeObject *__pyx_ptype_4kivy_8graphics_3vbo_VBO = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_3vbo_VertexBatch = 0;
static int (*__pyx_f_4kivy_8graphics_3vbo_vbo_vertex_attr_count)(void); /*proto*/
static __pyx_t_4kivy_8graphics_6vertex_vertex_attr_t *(*__pyx_f_4kivy_8graphics_3vbo_vbo_vertex_attr_list)(void); /*proto*/
/* Module declarations from kivy.graphics.transformation */

static PyTypeObject *__pyx_ptype_4kivy_8graphics_14transformation_Matrix = 0;
/* Module declarations from kivy.graphics.texture */

static PyTypeObject *__pyx_ptype_4kivy_8graphics_7texture_Texture = 0;
/* Module declarations from kivy.graphics.context_instructions */

static PyTypeObject *__pyx_ptype_4kivy_8graphics_20context_instructions_LineWidth = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_20context_instructions_Color = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_20context_instructions_BindTexture = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_20context_instructions_PushMatrix = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_20context_instructions_PopMatrix = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_20context_instructions_MatrixInstruction = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_20context_instructions_Transform = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_20context_instructions_Rotate = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_20context_instructions_Scale = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_20context_instructions_Translate = 0;
/* Module declarations from kivy.graphics.compiler */

static PyTypeObject *__pyx_ptype_4kivy_8graphics_8compiler_GraphicsCompiler = 0;
/* Module declarations from kivy.graphics.shader */

static PyTypeObject *__pyx_ptype_4kivy_8graphics_6shader_Shader = 0;
/* Module declarations from kivy.graphics.instructions */

static PyTypeObject *__pyx_ptype_4kivy_8graphics_12instructions_Instruction = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_12instructions_InstructionGroup = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_12instructions_ContextInstruction = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_12instructions_CanvasBase = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_12instructions_Canvas = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_12instructions_RenderContext = 0;
static struct __pyx_obj_4kivy_8graphics_12instructions_CanvasBase *(*__pyx_f_4kivy_8graphics_12instructions_getActiveCanvas)(void); /*proto*/
/* Module declarations from kivy.graphics.vertex_instructions */

static PyTypeObject *__pyx_ptype_4kivy_8graphics_19vertex_instructions_Line = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_19vertex_instructions_Point = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_19vertex_instructions_Triangle = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_19vertex_instructions_Quad = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_19vertex_instructions_Rectangle = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_19vertex_instructions_BorderImage = 0;
static PyTypeObject *__pyx_ptype_4kivy_8graphics_19vertex_instructions_Ellipse = 0;
static double __pyx_v_4kivy_8graphics_19vertex_instructions_pi;
#define __Pyx_MODULE_NAME "kivy.graphics.vertex_instructions"
int __pyx_module_is_main_kivy__graphics__vertex_instructions = 0;

/* Implementation of kivy.graphics.vertex_instructions */
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_xrange;
static char __pyx_k_8[] = "GBorderImage: texture missing";
static char __pyx_k_12[] = "Property for getting/settings points of the triangle\n\n        .. warning::\n            \n            This will always reconstruct the whole graphics from the new points\n            list. It can be very CPU expensive.\n        ";
static char __pyx_k_13[] = "Property for getting/settings points of the triangle\n        ";
static char __pyx_k_14[] = "Property for getting/setting point size\n        ";
static char __pyx_k_15[] = "Property for getting/settings points of the quads\n        ";
static char __pyx_k_16[] = "Property for getting/settings the position of the rectangle\n        ";
static char __pyx_k_17[] = "Property for getting/settings the size of the rectangle\n        ";
static char __pyx_k_18[] = "Property for getting/setting the border of the class\n        ";
static char __pyx_k_19[] = "Property for getting/setting the number of segments of the ellipse\n        ";
static char __pyx_k_20[] = "\nVertex Instructions\n===================\n\nThis module include all the classes for drawing simple vertex object.\n";
static char __pyx_k_22[] = "kivy.logger";
static char __pyx_k__h[] = "h";
static char __pyx_k__w[] = "w";
static char __pyx_k__x[] = "x";
static char __pyx_k__y[] = "y";
static char __pyx_k__s0[] = "s0";
static char __pyx_k__t0[] = "t0";
static char __pyx_k__pos[] = "pos";
static char __pyx_k__Line[] = "Line";
static char __pyx_k__Quad[] = "Quad";
static char __pyx_k__size[] = "size";
static char __pyx_k__Point[] = "Point";
static char __pyx_k__batch[] = "batch";
static char __pyx_k__range[] = "range";
static char __pyx_k__trace[] = "trace";
static char __pyx_k__Logger[] = "Logger";
static char __pyx_k__append[] = "append";
static char __pyx_k__border[] = "border";
static char __pyx_k__points[] = "points";
static char __pyx_k__xrange[] = "xrange";
static char __pyx_k__Ellipse[] = "Ellipse";
static char __pyx_k____all__[] = "__all__";
static char __pyx_k___border[] = "_border";
static char __pyx_k___points[] = "_points";
static char __pyx_k__indices[] = "indices";
static char __pyx_k__texture[] = "texture";
static char __pyx_k__Triangle[] = "Triangle";
static char __pyx_k____init__[] = "__init__";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k__segments[] = "segments";
static char __pyx_k__set_data[] = "set_data";
static char __pyx_k__set_mode[] = "set_mode";
static char __pyx_k__vertices[] = "vertices";
static char __pyx_k__Rectangle[] = "Rectangle";
static char __pyx_k___segments[] = "_segments";
static char __pyx_k__pointsize[] = "pointsize";
static char __pyx_k___pointsize[] = "_pointsize";
static char __pyx_k__line_strip[] = "line_strip";
static char __pyx_k__tex_coords[] = "tex_coords";
static char __pyx_k__BorderImage[] = "BorderImage";
static char __pyx_k__MemoryError[] = "MemoryError";
static char __pyx_k___tex_coords[] = "_tex_coords";
static char __pyx_k__append_data[] = "append_data";
static char __pyx_k__flag_update[] = "flag_update";
static PyObject *__pyx_n_s_22;
static PyObject *__pyx_kp_s_8;
static PyObject *__pyx_n_s__BorderImage;
static PyObject *__pyx_n_s__Ellipse;
static PyObject *__pyx_n_s__Line;
static PyObject *__pyx_n_s__Logger;
static PyObject *__pyx_n_s__MemoryError;
static PyObject *__pyx_n_s__Point;
static PyObject *__pyx_n_s__Quad;
static PyObject *__pyx_n_s__Rectangle;
static PyObject *__pyx_n_s__Triangle;
static PyObject *__pyx_n_s____all__;
static PyObject *__pyx_n_s____init__;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s___border;
static PyObject *__pyx_n_s___points;
static PyObject *__pyx_n_s___pointsize;
static PyObject *__pyx_n_s___segments;
static PyObject *__pyx_n_s___tex_coords;
static PyObject *__pyx_n_s__append;
static PyObject *__pyx_n_s__append_data;
static PyObject *__pyx_n_s__batch;
static PyObject *__pyx_n_s__border;
static PyObject *__pyx_n_s__flag_update;
static PyObject *__pyx_n_s__h;
static PyObject *__pyx_n_s__indices;
static PyObject *__pyx_n_s__line_strip;
static PyObject *__pyx_n_s__points;
static PyObject *__pyx_n_s__pointsize;
static PyObject *__pyx_n_s__pos;
static PyObject *__pyx_n_s__range;
static PyObject *__pyx_n_s__s0;
static PyObject *__pyx_n_s__segments;
static PyObject *__pyx_n_s__set_data;
static PyObject *__pyx_n_s__set_mode;
static PyObject *__pyx_n_s__size;
static PyObject *__pyx_n_s__t0;
static PyObject *__pyx_n_s__tex_coords;
static PyObject *__pyx_n_s__texture;
static PyObject *__pyx_n_s__trace;
static PyObject *__pyx_n_s__vertices;
static PyObject *__pyx_n_s__w;
static PyObject *__pyx_n_s__x;
static PyObject *__pyx_n_s__xrange;
static PyObject *__pyx_n_s__y;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_10;
static PyObject *__pyx_int_100;
static PyObject *__pyx_int_180;
static PyObject *__pyx_k_tuple_1;
static PyObject *__pyx_k_tuple_2;
static PyObject *__pyx_k_tuple_3;
static PyObject *__pyx_k_tuple_4;
static PyObject *__pyx_k_tuple_5;
static PyObject *__pyx_k_tuple_6;
static PyObject *__pyx_k_tuple_7;
static PyObject *__pyx_k_tuple_9;
static PyObject *__pyx_k_tuple_10;
static PyObject *__pyx_k_tuple_11;
static PyObject *__pyx_k_tuple_21;

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":34
 *     cdef list _points
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         VertexInstruction.__init__(self, **kwargs)
 *         self.points = kwargs.get('points', [])
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_4Line_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_4Line_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":35
 * 
 *     def __init__(self, **kwargs):
 *         VertexInstruction.__init__(self, **kwargs)             # <<<<<<<<<<<<<<
 *         self.points = kwargs.get('points', [])
 *         self.batch.set_mode('line_strip')
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction)), __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_v_kwargs)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":36
 *     def __init__(self, **kwargs):
 *         VertexInstruction.__init__(self, **kwargs)
 *         self.points = kwargs.get('points', [])             # <<<<<<<<<<<<<<
 *         self.batch.set_mode('line_strip')
 * 
 */
  if (unlikely(__pyx_v_kwargs == Py_None)) {
    PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'get'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__points), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__points, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":37
 *         VertexInstruction.__init__(self, **kwargs)
 *         self.points = kwargs.get('points', [])
 *         self.batch.set_mode('line_strip')             # <<<<<<<<<<<<<<
 * 
 *     cdef void build(self):
 */
  ((struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VertexBatch *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *)__pyx_v_self)->__pyx_base.batch->__pyx_vtab)->set_mode(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *)__pyx_v_self)->__pyx_base.batch, __pyx_n_s__line_strip);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Line.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":39
 *         self.batch.set_mode('line_strip')
 * 
 *     cdef void build(self):             # <<<<<<<<<<<<<<
 *         cdef int i, count = len(self.points) / 2
 *         cdef list p = self.points
 */

static  void __pyx_f_4kivy_8graphics_19vertex_instructions_4Line_build(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *__pyx_v_self) {
  int __pyx_v_i;
  int __pyx_v_count;
  PyObject *__pyx_v_p = 0;
  struct __pyx_t_4kivy_8graphics_6vertex_vertex_t *__pyx_v_vertices;
  int *__pyx_v_indices;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  long __pyx_t_6;
  float __pyx_t_7;
  __Pyx_RefNannySetupContext("build");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":40
 * 
 *     cdef void build(self):
 *         cdef int i, count = len(self.points) / 2             # <<<<<<<<<<<<<<
 *         cdef list p = self.points
 *         cdef vertex_t *vertices = NULL
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__points); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_count = __Pyx_div_Py_ssize_t(__pyx_t_2, 2);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":41
 *     cdef void build(self):
 *         cdef int i, count = len(self.points) / 2
 *         cdef list p = self.points             # <<<<<<<<<<<<<<
 *         cdef vertex_t *vertices = NULL
 *         cdef int *indices = NULL
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__points); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_p = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":42
 *         cdef int i, count = len(self.points) / 2
 *         cdef list p = self.points
 *         cdef vertex_t *vertices = NULL             # <<<<<<<<<<<<<<
 *         cdef int *indices = NULL
 * 
 */
  __pyx_v_vertices = NULL;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":43
 *         cdef list p = self.points
 *         cdef vertex_t *vertices = NULL
 *         cdef int *indices = NULL             # <<<<<<<<<<<<<<
 * 
 *         vertices = <vertex_t *>malloc(count * sizeof(vertex_t))
 */
  __pyx_v_indices = NULL;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":45
 *         cdef int *indices = NULL
 * 
 *         vertices = <vertex_t *>malloc(count * sizeof(vertex_t))             # <<<<<<<<<<<<<<
 *         if vertices == NULL:
 *             raise MemoryError('vertices')
 */
  __pyx_v_vertices = ((struct __pyx_t_4kivy_8graphics_6vertex_vertex_t *)malloc((__pyx_v_count * (sizeof(struct __pyx_t_4kivy_8graphics_6vertex_vertex_t)))));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":46
 * 
 *         vertices = <vertex_t *>malloc(count * sizeof(vertex_t))
 *         if vertices == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('vertices')
 * 
 */
  __pyx_t_3 = (__pyx_v_vertices == NULL);
  if (__pyx_t_3) {

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":47
 *         vertices = <vertex_t *>malloc(count * sizeof(vertex_t))
 *         if vertices == NULL:
 *             raise MemoryError('vertices')             # <<<<<<<<<<<<<<
 * 
 *         indices = <int *>malloc(count * sizeof(int))
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_1), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":49
 *             raise MemoryError('vertices')
 * 
 *         indices = <int *>malloc(count * sizeof(int))             # <<<<<<<<<<<<<<
 *         if indices == NULL:
 *             free(vertices)
 */
  __pyx_v_indices = ((int *)malloc((__pyx_v_count * (sizeof(int)))));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":50
 * 
 *         indices = <int *>malloc(count * sizeof(int))
 *         if indices == NULL:             # <<<<<<<<<<<<<<
 *             free(vertices)
 *             raise MemoryError('indices')
 */
  __pyx_t_3 = (__pyx_v_indices == NULL);
  if (__pyx_t_3) {

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":51
 *         indices = <int *>malloc(count * sizeof(int))
 *         if indices == NULL:
 *             free(vertices)             # <<<<<<<<<<<<<<
 *             raise MemoryError('indices')
 * 
 */
    free(__pyx_v_vertices);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":52
 *         if indices == NULL:
 *             free(vertices)
 *             raise MemoryError('indices')             # <<<<<<<<<<<<<<
 * 
 *         for i in xrange(count):
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":54
 *             raise MemoryError('indices')
 * 
 *         for i in xrange(count):             # <<<<<<<<<<<<<<
 *             vertices[i].x = p[i * 2]
 *             vertices[i].y = p[i * 2 + 1]
 */
  __pyx_t_4 = __pyx_v_count;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":55
 * 
 *         for i in xrange(count):
 *             vertices[i].x = p[i * 2]             # <<<<<<<<<<<<<<
 *             vertices[i].y = p[i * 2 + 1]
 *             indices[i] = i
 */
    __pyx_t_6 = (__pyx_v_i * 2);
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_p), __pyx_t_6, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    (__pyx_v_vertices[__pyx_v_i]).x = __pyx_t_7;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":56
 *         for i in xrange(count):
 *             vertices[i].x = p[i * 2]
 *             vertices[i].y = p[i * 2 + 1]             # <<<<<<<<<<<<<<
 *             indices[i] = i
 * 
 */
    __pyx_t_6 = ((__pyx_v_i * 2) + 1);
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_p), __pyx_t_6, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    (__pyx_v_vertices[__pyx_v_i]).y = __pyx_t_7;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":57
 *             vertices[i].x = p[i * 2]
 *             vertices[i].y = p[i * 2 + 1]
 *             indices[i] = i             # <<<<<<<<<<<<<<
 * 
 *         self.batch.set_data(vertices, count, indices, count)
 */
    (__pyx_v_indices[__pyx_v_i]) = __pyx_v_i;
  }

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":59
 *             indices[i] = i
 * 
 *         self.batch.set_data(vertices, count, indices, count)             # <<<<<<<<<<<<<<
 * 
 *         free(vertices)
 */
  ((struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VertexBatch *)__pyx_v_self->__pyx_base.batch->__pyx_vtab)->set_data(__pyx_v_self->__pyx_base.batch, __pyx_v_vertices, __pyx_v_count, __pyx_v_indices, __pyx_v_count);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":61
 *         self.batch.set_data(vertices, count, indices, count)
 * 
 *         free(vertices)             # <<<<<<<<<<<<<<
 *         free(indices)
 * 
 */
  free(__pyx_v_vertices);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":62
 * 
 *         free(vertices)
 *         free(indices)             # <<<<<<<<<<<<<<
 * 
 *     property points:
 */
  free(__pyx_v_indices);

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("kivy.graphics.vertex_instructions.Line.build");
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_RefNannyFinishContext();
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":72
 *             list. It can be very CPU expensive.
 *         '''
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._points
 *         def __set__(self, points):
 */

static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_4Line_6points_0__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_4Line_6points_0__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":73
 *         '''
 *         def __get__(self):
 *             return self._points             # <<<<<<<<<<<<<<
 *         def __set__(self, points):
 *             self._points = list(points)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *)__pyx_v_self)->_points));
  __pyx_r = ((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *)__pyx_v_self)->_points);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":74
 *         def __get__(self):
 *             return self._points
 *         def __set__(self, points):             # <<<<<<<<<<<<<<
 *             self._points = list(points)
 *             self.flag_update()
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_4Line_6points_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_points); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_4Line_6points_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_points) {
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__set__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":75
 *             return self._points
 *         def __set__(self, points):
 *             self._points = list(points)             # <<<<<<<<<<<<<<
 *             self.flag_update()
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_v_points);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_points);
  __Pyx_GIVEREF(__pyx_v_points);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *)__pyx_v_self)->_points);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *)__pyx_v_self)->_points));
  ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *)__pyx_v_self)->_points = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":76
 *         def __set__(self, points):
 *             self._points = list(points)
 *             self.flag_update()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Line *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.flag_update(((struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Line.points.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":91
 *     cdef float _pointsize
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         VertexInstruction.__init__(self, **kwargs)
 *         self.points = kwargs.get('points', [])
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":92
 * 
 *     def __init__(self, **kwargs):
 *         VertexInstruction.__init__(self, **kwargs)             # <<<<<<<<<<<<<<
 *         self.points = kwargs.get('points', [])
 *         self.pointsize = kwargs.get('pointsize', 1.)
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction)), __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_v_kwargs)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":93
 *     def __init__(self, **kwargs):
 *         VertexInstruction.__init__(self, **kwargs)
 *         self.points = kwargs.get('points', [])             # <<<<<<<<<<<<<<
 *         self.pointsize = kwargs.get('pointsize', 1.)
 * 
 */
  if (unlikely(__pyx_v_kwargs == Py_None)) {
    PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'get'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__points), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__points, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":94
 *         VertexInstruction.__init__(self, **kwargs)
 *         self.points = kwargs.get('points', [])
 *         self.pointsize = kwargs.get('pointsize', 1.)             # <<<<<<<<<<<<<<
 * 
 *     cdef void build(self):
 */
  if (unlikely(__pyx_v_kwargs == Py_None)) {
    PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'get'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_2 = PyFloat_FromDouble(1.); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__pointsize), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__pointsize, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Point.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":96
 *         self.pointsize = kwargs.get('pointsize', 1.)
 * 
 *     cdef void build(self):             # <<<<<<<<<<<<<<
 *         cdef float t0, t1, t2, t3, t4, t5, t6, t7
 *         cdef float x, y, ps = self._pointsize
 */

static  void __pyx_f_4kivy_8graphics_19vertex_instructions_5Point_build(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *__pyx_v_self) {
  float __pyx_v_t0;
  float __pyx_v_t1;
  float __pyx_v_t2;
  float __pyx_v_t3;
  float __pyx_v_t4;
  float __pyx_v_t5;
  float __pyx_v_t6;
  float __pyx_v_t7;
  float __pyx_v_x;
  float __pyx_v_y;
  float __pyx_v_ps;
  int __pyx_v_i;
  int __pyx_v_iv;
  int __pyx_v_ii;
  int __pyx_v_count;
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_tc = 0;
  struct __pyx_t_4kivy_8graphics_6vertex_vertex_t *__pyx_v_vertices;
  int *__pyx_v_indices;
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  float __pyx_t_11;
  float __pyx_t_12;
  float __pyx_t_13;
  float __pyx_t_14;
  float __pyx_t_15;
  float __pyx_t_16;
  float __pyx_t_17;
  float __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_t_20;
  int __pyx_t_21;
  long __pyx_t_22;
  __Pyx_RefNannySetupContext("build");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":98
 *     cdef void build(self):
 *         cdef float t0, t1, t2, t3, t4, t5, t6, t7
 *         cdef float x, y, ps = self._pointsize             # <<<<<<<<<<<<<<
 *         cdef int i, iv, ii, count = <int>(len(self._points) * 0.5)
 *         cdef list p = self.points
 */
  __pyx_v_ps = __pyx_v_self->_pointsize;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":99
 *         cdef float t0, t1, t2, t3, t4, t5, t6, t7
 *         cdef float x, y, ps = self._pointsize
 *         cdef int i, iv, ii, count = <int>(len(self._points) * 0.5)             # <<<<<<<<<<<<<<
 *         cdef list p = self.points
 *         cdef list tc = self._tex_coords
 */
  if (unlikely(__pyx_v_self->_points == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_self->_points)); 
  __pyx_v_count = ((int)(__pyx_t_1 * 0.5));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":100
 *         cdef float x, y, ps = self._pointsize
 *         cdef int i, iv, ii, count = <int>(len(self._points) * 0.5)
 *         cdef list p = self.points             # <<<<<<<<<<<<<<
 *         cdef list tc = self._tex_coords
 *         cdef vertex_t *vertices = NULL
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__points); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_p = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":101
 *         cdef int i, iv, ii, count = <int>(len(self._points) * 0.5)
 *         cdef list p = self.points
 *         cdef list tc = self._tex_coords             # <<<<<<<<<<<<<<
 *         cdef vertex_t *vertices = NULL
 *         cdef int *indices = NULL
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._tex_coords));
  __pyx_v_tc = __pyx_v_self->__pyx_base._tex_coords;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":102
 *         cdef list p = self.points
 *         cdef list tc = self._tex_coords
 *         cdef vertex_t *vertices = NULL             # <<<<<<<<<<<<<<
 *         cdef int *indices = NULL
 * 
 */
  __pyx_v_vertices = NULL;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":103
 *         cdef list tc = self._tex_coords
 *         cdef vertex_t *vertices = NULL
 *         cdef int *indices = NULL             # <<<<<<<<<<<<<<
 * 
 *         vertices = <vertex_t *>malloc(count * 4 * sizeof(vertex_t))
 */
  __pyx_v_indices = NULL;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":105
 *         cdef int *indices = NULL
 * 
 *         vertices = <vertex_t *>malloc(count * 4 * sizeof(vertex_t))             # <<<<<<<<<<<<<<
 *         if vertices == NULL:
 *             raise MemoryError('vertices')
 */
  __pyx_v_vertices = ((struct __pyx_t_4kivy_8graphics_6vertex_vertex_t *)malloc(((__pyx_v_count * 4) * (sizeof(struct __pyx_t_4kivy_8graphics_6vertex_vertex_t)))));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":106
 * 
 *         vertices = <vertex_t *>malloc(count * 4 * sizeof(vertex_t))
 *         if vertices == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('vertices')
 * 
 */
  __pyx_t_3 = (__pyx_v_vertices == NULL);
  if (__pyx_t_3) {

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":107
 *         vertices = <vertex_t *>malloc(count * 4 * sizeof(vertex_t))
 *         if vertices == NULL:
 *             raise MemoryError('vertices')             # <<<<<<<<<<<<<<
 * 
 *         indices = <int *>malloc(count * 6 * sizeof(int))
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":109
 *             raise MemoryError('vertices')
 * 
 *         indices = <int *>malloc(count * 6 * sizeof(int))             # <<<<<<<<<<<<<<
 *         if indices == NULL:
 *             free(vertices)
 */
  __pyx_v_indices = ((int *)malloc(((__pyx_v_count * 6) * (sizeof(int)))));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":110
 * 
 *         indices = <int *>malloc(count * 6 * sizeof(int))
 *         if indices == NULL:             # <<<<<<<<<<<<<<
 *             free(vertices)
 *             raise MemoryError('indices')
 */
  __pyx_t_3 = (__pyx_v_indices == NULL);
  if (__pyx_t_3) {

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":111
 *         indices = <int *>malloc(count * 6 * sizeof(int))
 *         if indices == NULL:
 *             free(vertices)             # <<<<<<<<<<<<<<
 *             raise MemoryError('indices')
 * 
 */
    free(__pyx_v_vertices);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":112
 *         if indices == NULL:
 *             free(vertices)
 *             raise MemoryError('indices')             # <<<<<<<<<<<<<<
 * 
 *         t0, t1, t2, t3, t4, t5, t6, t7 = tc
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":114
 *             raise MemoryError('indices')
 * 
 *         t0, t1, t2, t3, t4, t5, t6, t7 = tc             # <<<<<<<<<<<<<<
 * 
 *         for i in xrange(count):
 */
  if (PyTuple_CheckExact(((PyObject *)__pyx_v_tc)) && likely(PyTuple_GET_SIZE(((PyObject *)__pyx_v_tc)) == 8)) {
    PyObject* tuple = ((PyObject *)__pyx_v_tc);
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
    __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_5);
    __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = PyTuple_GET_ITEM(tuple, 3); __Pyx_INCREF(__pyx_t_6);
    __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_14 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = PyTuple_GET_ITEM(tuple, 4); __Pyx_INCREF(__pyx_t_7);
    __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_15 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = PyTuple_GET_ITEM(tuple, 5); __Pyx_INCREF(__pyx_t_8);
    __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_16 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = PyTuple_GET_ITEM(tuple, 6); __Pyx_INCREF(__pyx_t_9);
    __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_9); if (unlikely((__pyx_t_17 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_10 = PyTuple_GET_ITEM(tuple, 7); __Pyx_INCREF(__pyx_t_10);
    __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_18 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_t0 = __pyx_t_11;
    __pyx_v_t1 = __pyx_t_12;
    __pyx_v_t2 = __pyx_t_13;
    __pyx_v_t3 = __pyx_t_14;
    __pyx_v_t4 = __pyx_t_15;
    __pyx_v_t5 = __pyx_t_16;
    __pyx_v_t6 = __pyx_t_17;
    __pyx_v_t7 = __pyx_t_18;
  } else {
    __pyx_t_19 = PyObject_GetIter(((PyObject *)__pyx_v_tc)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_19, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_18 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_19, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_17 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_19, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_16 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_19, 3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_15 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_19, 4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_14 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = __Pyx_UnpackItem(__pyx_t_19, 5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_19, 6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_9); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_10 = __Pyx_UnpackItem(__pyx_t_19, 7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__Pyx_EndUnpack(__pyx_t_19, 8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_v_t0 = __pyx_t_18;
    __pyx_v_t1 = __pyx_t_17;
    __pyx_v_t2 = __pyx_t_16;
    __pyx_v_t3 = __pyx_t_15;
    __pyx_v_t4 = __pyx_t_14;
    __pyx_v_t5 = __pyx_t_13;
    __pyx_v_t6 = __pyx_t_12;
    __pyx_v_t7 = __pyx_t_11;
  }

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":116
 *         t0, t1, t2, t3, t4, t5, t6, t7 = tc
 * 
 *         for i in xrange(count):             # <<<<<<<<<<<<<<
 *             x = p[i * 2]
 *             y = p[i * 2 + 1]
 */
  __pyx_t_20 = __pyx_v_count;
  for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) {
    __pyx_v_i = __pyx_t_21;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":117
 * 
 *         for i in xrange(count):
 *             x = p[i * 2]             # <<<<<<<<<<<<<<
 *             y = p[i * 2 + 1]
 *             iv = i * 4
 */
    __pyx_t_22 = (__pyx_v_i * 2);
    __pyx_t_10 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_p), __pyx_t_22, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_x = __pyx_t_11;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":118
 *         for i in xrange(count):
 *             x = p[i * 2]
 *             y = p[i * 2 + 1]             # <<<<<<<<<<<<<<
 *             iv = i * 4
 *             vertices[iv].x = x - ps
 */
    __pyx_t_22 = ((__pyx_v_i * 2) + 1);
    __pyx_t_10 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_p), __pyx_t_22, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_y = __pyx_t_11;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":119
 *             x = p[i * 2]
 *             y = p[i * 2 + 1]
 *             iv = i * 4             # <<<<<<<<<<<<<<
 *             vertices[iv].x = x - ps
 *             vertices[iv].y = y - ps
 */
    __pyx_v_iv = (__pyx_v_i * 4);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":120
 *             y = p[i * 2 + 1]
 *             iv = i * 4
 *             vertices[iv].x = x - ps             # <<<<<<<<<<<<<<
 *             vertices[iv].y = y - ps
 *             vertices[iv].s0 = t0
 */
    (__pyx_v_vertices[__pyx_v_iv]).x = (__pyx_v_x - __pyx_v_ps);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":121
 *             iv = i * 4
 *             vertices[iv].x = x - ps
 *             vertices[iv].y = y - ps             # <<<<<<<<<<<<<<
 *             vertices[iv].s0 = t0
 *             vertices[iv].t0 = t1
 */
    (__pyx_v_vertices[__pyx_v_iv]).y = (__pyx_v_y - __pyx_v_ps);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":122
 *             vertices[iv].x = x - ps
 *             vertices[iv].y = y - ps
 *             vertices[iv].s0 = t0             # <<<<<<<<<<<<<<
 *             vertices[iv].t0 = t1
 *             vertices[iv + 1].x = x + ps
 */
    (__pyx_v_vertices[__pyx_v_iv]).s0 = __pyx_v_t0;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":123
 *             vertices[iv].y = y - ps
 *             vertices[iv].s0 = t0
 *             vertices[iv].t0 = t1             # <<<<<<<<<<<<<<
 *             vertices[iv + 1].x = x + ps
 *             vertices[iv + 1].y = y - ps
 */
    (__pyx_v_vertices[__pyx_v_iv]).t0 = __pyx_v_t1;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":124
 *             vertices[iv].s0 = t0
 *             vertices[iv].t0 = t1
 *             vertices[iv + 1].x = x + ps             # <<<<<<<<<<<<<<
 *             vertices[iv + 1].y = y - ps
 *             vertices[iv + 1].s0 = t2
 */
    (__pyx_v_vertices[(__pyx_v_iv + 1)]).x = (__pyx_v_x + __pyx_v_ps);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":125
 *             vertices[iv].t0 = t1
 *             vertices[iv + 1].x = x + ps
 *             vertices[iv + 1].y = y - ps             # <<<<<<<<<<<<<<
 *             vertices[iv + 1].s0 = t2
 *             vertices[iv + 1].t0 = t3
 */
    (__pyx_v_vertices[(__pyx_v_iv + 1)]).y = (__pyx_v_y - __pyx_v_ps);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":126
 *             vertices[iv + 1].x = x + ps
 *             vertices[iv + 1].y = y - ps
 *             vertices[iv + 1].s0 = t2             # <<<<<<<<<<<<<<
 *             vertices[iv + 1].t0 = t3
 *             vertices[iv + 2].x = x + ps
 */
    (__pyx_v_vertices[(__pyx_v_iv + 1)]).s0 = __pyx_v_t2;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":127
 *             vertices[iv + 1].y = y - ps
 *             vertices[iv + 1].s0 = t2
 *             vertices[iv + 1].t0 = t3             # <<<<<<<<<<<<<<
 *             vertices[iv + 2].x = x + ps
 *             vertices[iv + 2].y = y + ps
 */
    (__pyx_v_vertices[(__pyx_v_iv + 1)]).t0 = __pyx_v_t3;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":128
 *             vertices[iv + 1].s0 = t2
 *             vertices[iv + 1].t0 = t3
 *             vertices[iv + 2].x = x + ps             # <<<<<<<<<<<<<<
 *             vertices[iv + 2].y = y + ps
 *             vertices[iv + 2].s0 = t4
 */
    (__pyx_v_vertices[(__pyx_v_iv + 2)]).x = (__pyx_v_x + __pyx_v_ps);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":129
 *             vertices[iv + 1].t0 = t3
 *             vertices[iv + 2].x = x + ps
 *             vertices[iv + 2].y = y + ps             # <<<<<<<<<<<<<<
 *             vertices[iv + 2].s0 = t4
 *             vertices[iv + 2].t0 = t5
 */
    (__pyx_v_vertices[(__pyx_v_iv + 2)]).y = (__pyx_v_y + __pyx_v_ps);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":130
 *             vertices[iv + 2].x = x + ps
 *             vertices[iv + 2].y = y + ps
 *             vertices[iv + 2].s0 = t4             # <<<<<<<<<<<<<<
 *             vertices[iv + 2].t0 = t5
 *             vertices[iv + 3].x = x - ps
 */
    (__pyx_v_vertices[(__pyx_v_iv + 2)]).s0 = __pyx_v_t4;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":131
 *             vertices[iv + 2].y = y + ps
 *             vertices[iv + 2].s0 = t4
 *             vertices[iv + 2].t0 = t5             # <<<<<<<<<<<<<<
 *             vertices[iv + 3].x = x - ps
 *             vertices[iv + 3].y = y + ps
 */
    (__pyx_v_vertices[(__pyx_v_iv + 2)]).t0 = __pyx_v_t5;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":132
 *             vertices[iv + 2].s0 = t4
 *             vertices[iv + 2].t0 = t5
 *             vertices[iv + 3].x = x - ps             # <<<<<<<<<<<<<<
 *             vertices[iv + 3].y = y + ps
 *             vertices[iv + 3].s0 = t6
 */
    (__pyx_v_vertices[(__pyx_v_iv + 3)]).x = (__pyx_v_x - __pyx_v_ps);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":133
 *             vertices[iv + 2].t0 = t5
 *             vertices[iv + 3].x = x - ps
 *             vertices[iv + 3].y = y + ps             # <<<<<<<<<<<<<<
 *             vertices[iv + 3].s0 = t6
 *             vertices[iv + 3].t0 = t7
 */
    (__pyx_v_vertices[(__pyx_v_iv + 3)]).y = (__pyx_v_y + __pyx_v_ps);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":134
 *             vertices[iv + 3].x = x - ps
 *             vertices[iv + 3].y = y + ps
 *             vertices[iv + 3].s0 = t6             # <<<<<<<<<<<<<<
 *             vertices[iv + 3].t0 = t7
 * 
 */
    (__pyx_v_vertices[(__pyx_v_iv + 3)]).s0 = __pyx_v_t6;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":135
 *             vertices[iv + 3].y = y + ps
 *             vertices[iv + 3].s0 = t6
 *             vertices[iv + 3].t0 = t7             # <<<<<<<<<<<<<<
 * 
 *             ii = i * 6
 */
    (__pyx_v_vertices[(__pyx_v_iv + 3)]).t0 = __pyx_v_t7;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":137
 *             vertices[iv + 3].t0 = t7
 * 
 *             ii = i * 6             # <<<<<<<<<<<<<<
 *             indices[ii] = iv
 *             indices[ii + 1] = iv + 1
 */
    __pyx_v_ii = (__pyx_v_i * 6);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":138
 * 
 *             ii = i * 6
 *             indices[ii] = iv             # <<<<<<<<<<<<<<
 *             indices[ii + 1] = iv + 1
 *             indices[ii + 2] = iv + 2
 */
    (__pyx_v_indices[__pyx_v_ii]) = __pyx_v_iv;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":139
 *             ii = i * 6
 *             indices[ii] = iv
 *             indices[ii + 1] = iv + 1             # <<<<<<<<<<<<<<
 *             indices[ii + 2] = iv + 2
 *             indices[ii + 3] = iv + 2
 */
    (__pyx_v_indices[(__pyx_v_ii + 1)]) = (__pyx_v_iv + 1);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":140
 *             indices[ii] = iv
 *             indices[ii + 1] = iv + 1
 *             indices[ii + 2] = iv + 2             # <<<<<<<<<<<<<<
 *             indices[ii + 3] = iv + 2
 *             indices[ii + 4] = iv + 3
 */
    (__pyx_v_indices[(__pyx_v_ii + 2)]) = (__pyx_v_iv + 2);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":141
 *             indices[ii + 1] = iv + 1
 *             indices[ii + 2] = iv + 2
 *             indices[ii + 3] = iv + 2             # <<<<<<<<<<<<<<
 *             indices[ii + 4] = iv + 3
 *             indices[ii + 5] = iv
 */
    (__pyx_v_indices[(__pyx_v_ii + 3)]) = (__pyx_v_iv + 2);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":142
 *             indices[ii + 2] = iv + 2
 *             indices[ii + 3] = iv + 2
 *             indices[ii + 4] = iv + 3             # <<<<<<<<<<<<<<
 *             indices[ii + 5] = iv
 * 
 */
    (__pyx_v_indices[(__pyx_v_ii + 4)]) = (__pyx_v_iv + 3);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":143
 *             indices[ii + 3] = iv + 2
 *             indices[ii + 4] = iv + 3
 *             indices[ii + 5] = iv             # <<<<<<<<<<<<<<
 * 
 *         self.batch.set_data(vertices, count * 4, indices, count * 6)
 */
    (__pyx_v_indices[(__pyx_v_ii + 5)]) = __pyx_v_iv;
  }

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":145
 *             indices[ii + 5] = iv
 * 
 *         self.batch.set_data(vertices, count * 4, indices, count * 6)             # <<<<<<<<<<<<<<
 * 
 *         free(vertices)
 */
  ((struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VertexBatch *)__pyx_v_self->__pyx_base.batch->__pyx_vtab)->set_data(__pyx_v_self->__pyx_base.batch, __pyx_v_vertices, (__pyx_v_count * 4), __pyx_v_indices, (__pyx_v_count * 6));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":147
 *         self.batch.set_data(vertices, count * 4, indices, count * 6)
 * 
 *         free(vertices)             # <<<<<<<<<<<<<<
 *         free(indices)
 * 
 */
  free(__pyx_v_vertices);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":148
 * 
 *         free(vertices)
 *         free(indices)             # <<<<<<<<<<<<<<
 * 
 *     def add_point(self, float x, float y):
 */
  free(__pyx_v_indices);

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_WriteUnraisable("kivy.graphics.vertex_instructions.Point.build");
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_tc);
  __Pyx_RefNannyFinishContext();
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":150
 *         free(indices)
 * 
 *     def add_point(self, float x, float y):             # <<<<<<<<<<<<<<
 *         '''Add a point into the current :data:`points` list.
 * 
 */

static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_1add_point(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4kivy_8graphics_19vertex_instructions_5Point_1add_point[] = "Point.add_point(self, float x, float y)\nAdd a point into the current :data:`points` list.\n\n        If you intend to add multiple point, prefer to use this method, instead\n        of reassign a new :data:`points` list. Assigning a new :data:`points`\n        list will recalculate and reupload the whole buffer into GPU.\n        If you use add_point, it will only upload the changes.\n        ";
static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_1add_point(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  float __pyx_v_x;
  float __pyx_v_y;
  float __pyx_v_t0;
  float __pyx_v_t1;
  float __pyx_v_t2;
  float __pyx_v_t3;
  float __pyx_v_t4;
  float __pyx_v_t5;
  float __pyx_v_t6;
  float __pyx_v_t7;
  float __pyx_v_ps;
  int __pyx_v_iv;
  int __pyx_v_count;
  PyObject *__pyx_v_tc = 0;
  struct __pyx_t_4kivy_8graphics_6vertex_vertex_t __pyx_v_vertices[4];
  int __pyx_v_indices[6];
  PyObject *__pyx_r = NULL;
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  float __pyx_t_11;
  float __pyx_t_12;
  float __pyx_t_13;
  float __pyx_t_14;
  float __pyx_t_15;
  float __pyx_t_16;
  float __pyx_t_17;
  float __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__y,0};
  __Pyx_RefNannySetupContext("add_point");
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[2] = {0,0};
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y);
      if (likely(values[1])) kw_args--;
      else {
        __Pyx_RaiseArgtupleInvalid("add_point", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "add_point") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_x = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_x == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_y = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_y == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_point", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Point.add_point");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":159
 *         '''
 *         cdef float t0, t1, t2, t3, t4, t5, t6, t7
 *         cdef float ps = self._pointsize             # <<<<<<<<<<<<<<
 *         cdef int iv, count = <int>(len(self._points) * 0.5)
 *         cdef list tc = self._tex_coords
 */
  __pyx_v_ps = ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_pointsize;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":160
 *         cdef float t0, t1, t2, t3, t4, t5, t6, t7
 *         cdef float ps = self._pointsize
 *         cdef int iv, count = <int>(len(self._points) * 0.5)             # <<<<<<<<<<<<<<
 *         cdef list tc = self._tex_coords
 *         cdef vertex_t vertices[4]
 */
  if (unlikely(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_points == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_points)); 
  __pyx_v_count = ((int)(__pyx_t_1 * 0.5));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":161
 *         cdef float ps = self._pointsize
 *         cdef int iv, count = <int>(len(self._points) * 0.5)
 *         cdef list tc = self._tex_coords             # <<<<<<<<<<<<<<
 *         cdef vertex_t vertices[4]
 *         cdef int indices[6]
 */
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->__pyx_base._tex_coords));
  __pyx_v_tc = ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->__pyx_base._tex_coords;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":165
 *         cdef int indices[6]
 * 
 *         self._points.append(x)             # <<<<<<<<<<<<<<
 *         self._points.append(y)
 * 
 */
  if (unlikely(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_points == Py_None)) {
    PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_Append(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_points, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":166
 * 
 *         self._points.append(x)
 *         self._points.append(y)             # <<<<<<<<<<<<<<
 * 
 *         t0, t1, t2, t3, t4, t5, t6, t7 = tc
 */
  if (unlikely(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_points == Py_None)) {
    PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_Append(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_points, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":168
 *         self._points.append(y)
 * 
 *         t0, t1, t2, t3, t4, t5, t6, t7 = tc             # <<<<<<<<<<<<<<
 *         vertices[0].x = x - ps
 *         vertices[0].y = y - ps
 */
  if (PyTuple_CheckExact(((PyObject *)__pyx_v_tc)) && likely(PyTuple_GET_SIZE(((PyObject *)__pyx_v_tc)) == 8)) {
    PyObject* tuple = ((PyObject *)__pyx_v_tc);
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
    __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_5);
    __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = PyTuple_GET_ITEM(tuple, 3); __Pyx_INCREF(__pyx_t_6);
    __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_14 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = PyTuple_GET_ITEM(tuple, 4); __Pyx_INCREF(__pyx_t_7);
    __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_15 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = PyTuple_GET_ITEM(tuple, 5); __Pyx_INCREF(__pyx_t_8);
    __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_16 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = PyTuple_GET_ITEM(tuple, 6); __Pyx_INCREF(__pyx_t_9);
    __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_9); if (unlikely((__pyx_t_17 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_10 = PyTuple_GET_ITEM(tuple, 7); __Pyx_INCREF(__pyx_t_10);
    __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_18 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_t0 = __pyx_t_11;
    __pyx_v_t1 = __pyx_t_12;
    __pyx_v_t2 = __pyx_t_13;
    __pyx_v_t3 = __pyx_t_14;
    __pyx_v_t4 = __pyx_t_15;
    __pyx_v_t5 = __pyx_t_16;
    __pyx_v_t6 = __pyx_t_17;
    __pyx_v_t7 = __pyx_t_18;
  } else {
    __pyx_t_19 = PyObject_GetIter(((PyObject *)__pyx_v_tc)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_19, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_18 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_19, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_17 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_19, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_16 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_19, 3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_15 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_19, 4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_14 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = __Pyx_UnpackItem(__pyx_t_19, 5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_19, 6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_9); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_10 = __Pyx_UnpackItem(__pyx_t_19, 7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__Pyx_EndUnpack(__pyx_t_19, 8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_v_t0 = __pyx_t_18;
    __pyx_v_t1 = __pyx_t_17;
    __pyx_v_t2 = __pyx_t_16;
    __pyx_v_t3 = __pyx_t_15;
    __pyx_v_t4 = __pyx_t_14;
    __pyx_v_t5 = __pyx_t_13;
    __pyx_v_t6 = __pyx_t_12;
    __pyx_v_t7 = __pyx_t_11;
  }

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":169
 * 
 *         t0, t1, t2, t3, t4, t5, t6, t7 = tc
 *         vertices[0].x = x - ps             # <<<<<<<<<<<<<<
 *         vertices[0].y = y - ps
 *         vertices[0].s0 = t0
 */
  (__pyx_v_vertices[0]).x = (__pyx_v_x - __pyx_v_ps);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":170
 *         t0, t1, t2, t3, t4, t5, t6, t7 = tc
 *         vertices[0].x = x - ps
 *         vertices[0].y = y - ps             # <<<<<<<<<<<<<<
 *         vertices[0].s0 = t0
 *         vertices[0].t0 = t1
 */
  (__pyx_v_vertices[0]).y = (__pyx_v_y - __pyx_v_ps);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":171
 *         vertices[0].x = x - ps
 *         vertices[0].y = y - ps
 *         vertices[0].s0 = t0             # <<<<<<<<<<<<<<
 *         vertices[0].t0 = t1
 *         vertices[1].x = x + ps
 */
  (__pyx_v_vertices[0]).s0 = __pyx_v_t0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":172
 *         vertices[0].y = y - ps
 *         vertices[0].s0 = t0
 *         vertices[0].t0 = t1             # <<<<<<<<<<<<<<
 *         vertices[1].x = x + ps
 *         vertices[1].y = y - ps
 */
  (__pyx_v_vertices[0]).t0 = __pyx_v_t1;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":173
 *         vertices[0].s0 = t0
 *         vertices[0].t0 = t1
 *         vertices[1].x = x + ps             # <<<<<<<<<<<<<<
 *         vertices[1].y = y - ps
 *         vertices[1].s0 = t2
 */
  (__pyx_v_vertices[1]).x = (__pyx_v_x + __pyx_v_ps);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":174
 *         vertices[0].t0 = t1
 *         vertices[1].x = x + ps
 *         vertices[1].y = y - ps             # <<<<<<<<<<<<<<
 *         vertices[1].s0 = t2
 *         vertices[1].t0 = t3
 */
  (__pyx_v_vertices[1]).y = (__pyx_v_y - __pyx_v_ps);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":175
 *         vertices[1].x = x + ps
 *         vertices[1].y = y - ps
 *         vertices[1].s0 = t2             # <<<<<<<<<<<<<<
 *         vertices[1].t0 = t3
 *         vertices[2].x = x + ps
 */
  (__pyx_v_vertices[1]).s0 = __pyx_v_t2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":176
 *         vertices[1].y = y - ps
 *         vertices[1].s0 = t2
 *         vertices[1].t0 = t3             # <<<<<<<<<<<<<<
 *         vertices[2].x = x + ps
 *         vertices[2].y = y + ps
 */
  (__pyx_v_vertices[1]).t0 = __pyx_v_t3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":177
 *         vertices[1].s0 = t2
 *         vertices[1].t0 = t3
 *         vertices[2].x = x + ps             # <<<<<<<<<<<<<<
 *         vertices[2].y = y + ps
 *         vertices[2].s0 = t4
 */
  (__pyx_v_vertices[2]).x = (__pyx_v_x + __pyx_v_ps);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":178
 *         vertices[1].t0 = t3
 *         vertices[2].x = x + ps
 *         vertices[2].y = y + ps             # <<<<<<<<<<<<<<
 *         vertices[2].s0 = t4
 *         vertices[2].t0 = t5
 */
  (__pyx_v_vertices[2]).y = (__pyx_v_y + __pyx_v_ps);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":179
 *         vertices[2].x = x + ps
 *         vertices[2].y = y + ps
 *         vertices[2].s0 = t4             # <<<<<<<<<<<<<<
 *         vertices[2].t0 = t5
 *         vertices[3].x = x - ps
 */
  (__pyx_v_vertices[2]).s0 = __pyx_v_t4;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":180
 *         vertices[2].y = y + ps
 *         vertices[2].s0 = t4
 *         vertices[2].t0 = t5             # <<<<<<<<<<<<<<
 *         vertices[3].x = x - ps
 *         vertices[3].y = y + ps
 */
  (__pyx_v_vertices[2]).t0 = __pyx_v_t5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":181
 *         vertices[2].s0 = t4
 *         vertices[2].t0 = t5
 *         vertices[3].x = x - ps             # <<<<<<<<<<<<<<
 *         vertices[3].y = y + ps
 *         vertices[3].s0 = t6
 */
  (__pyx_v_vertices[3]).x = (__pyx_v_x - __pyx_v_ps);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":182
 *         vertices[2].t0 = t5
 *         vertices[3].x = x - ps
 *         vertices[3].y = y + ps             # <<<<<<<<<<<<<<
 *         vertices[3].s0 = t6
 *         vertices[3].t0 = t7
 */
  (__pyx_v_vertices[3]).y = (__pyx_v_y + __pyx_v_ps);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":183
 *         vertices[3].x = x - ps
 *         vertices[3].y = y + ps
 *         vertices[3].s0 = t6             # <<<<<<<<<<<<<<
 *         vertices[3].t0 = t7
 * 
 */
  (__pyx_v_vertices[3]).s0 = __pyx_v_t6;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":184
 *         vertices[3].y = y + ps
 *         vertices[3].s0 = t6
 *         vertices[3].t0 = t7             # <<<<<<<<<<<<<<
 * 
 *         iv = count * 4
 */
  (__pyx_v_vertices[3]).t0 = __pyx_v_t7;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":186
 *         vertices[3].t0 = t7
 * 
 *         iv = count * 4             # <<<<<<<<<<<<<<
 *         indices[0] = iv
 *         indices[1] = iv + 1
 */
  __pyx_v_iv = (__pyx_v_count * 4);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":187
 * 
 *         iv = count * 4
 *         indices[0] = iv             # <<<<<<<<<<<<<<
 *         indices[1] = iv + 1
 *         indices[2] = iv + 2
 */
  (__pyx_v_indices[0]) = __pyx_v_iv;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":188
 *         iv = count * 4
 *         indices[0] = iv
 *         indices[1] = iv + 1             # <<<<<<<<<<<<<<
 *         indices[2] = iv + 2
 *         indices[3] = iv + 2
 */
  (__pyx_v_indices[1]) = (__pyx_v_iv + 1);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":189
 *         indices[0] = iv
 *         indices[1] = iv + 1
 *         indices[2] = iv + 2             # <<<<<<<<<<<<<<
 *         indices[3] = iv + 2
 *         indices[4] = iv + 3
 */
  (__pyx_v_indices[2]) = (__pyx_v_iv + 2);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":190
 *         indices[1] = iv + 1
 *         indices[2] = iv + 2
 *         indices[3] = iv + 2             # <<<<<<<<<<<<<<
 *         indices[4] = iv + 3
 *         indices[5] = iv
 */
  (__pyx_v_indices[3]) = (__pyx_v_iv + 2);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":191
 *         indices[2] = iv + 2
 *         indices[3] = iv + 2
 *         indices[4] = iv + 3             # <<<<<<<<<<<<<<
 *         indices[5] = iv
 * 
 */
  (__pyx_v_indices[4]) = (__pyx_v_iv + 3);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":192
 *         indices[3] = iv + 2
 *         indices[4] = iv + 3
 *         indices[5] = iv             # <<<<<<<<<<<<<<
 * 
 *         # append the vertices / indices to current vertex batch
 */
  (__pyx_v_indices[5]) = __pyx_v_iv;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":195
 * 
 *         # append the vertices / indices to current vertex batch
 *         self.batch.append_data(vertices, 4, indices, 6)             # <<<<<<<<<<<<<<
 * 
 *     property points:
 */
  ((struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VertexBatch *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->__pyx_base.batch->__pyx_vtab)->append_data(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->__pyx_base.batch, __pyx_v_vertices, 4, __pyx_v_indices, 6);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Point.add_point");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":200
 *         '''Property for getting/settings points of the triangle
 *         '''
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._points
 *         def __set__(self, points):
 */

static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_6points_0__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_6points_0__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":201
 *         '''
 *         def __get__(self):
 *             return self._points             # <<<<<<<<<<<<<<
 *         def __set__(self, points):
 *             if self._points == points:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_points));
  __pyx_r = ((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_points);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":202
 *         def __get__(self):
 *             return self._points
 *         def __set__(self, points):             # <<<<<<<<<<<<<<
 *             if self._points == points:
 *                 return
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_6points_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_points); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_6points_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_points) {
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":203
 *             return self._points
 *         def __set__(self, points):
 *             if self._points == points:             # <<<<<<<<<<<<<<
 *                 return
 *             self._points = list(points)
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_points), __pyx_v_points, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":204
 *         def __set__(self, points):
 *             if self._points == points:
 *                 return             # <<<<<<<<<<<<<<
 *             self._points = list(points)
 *             self.flag_update()
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":205
 *             if self._points == points:
 *                 return
 *             self._points = list(points)             # <<<<<<<<<<<<<<
 *             self.flag_update()
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_v_points);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_points);
  __Pyx_GIVEREF(__pyx_v_points);
  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_points);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_points));
  ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_points = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":206
 *                 return
 *             self._points = list(points)
 *             self.flag_update()             # <<<<<<<<<<<<<<
 * 
 *     property pointsize:
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Point *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.flag_update(((struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Point.points.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":211
 *         '''Property for getting/setting point size
 *         '''
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._pointsize
 *         def __set__(self, float pointsize):
 */

static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_9pointsize_0__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_9pointsize_0__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":212
 *         '''
 *         def __get__(self):
 *             return self._pointsize             # <<<<<<<<<<<<<<
 *         def __set__(self, float pointsize):
 *             if self._pointsize == pointsize:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_pointsize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Point.pointsize.__get__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":213
 *         def __get__(self):
 *             return self._pointsize
 *         def __set__(self, float pointsize):             # <<<<<<<<<<<<<<
 *             if self._pointsize == pointsize:
 *                 return
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_9pointsize_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_pointsize); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_9pointsize_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_pointsize) {
  float __pyx_v_pointsize;
  int __pyx_r;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__set__");
  assert(__pyx_arg_pointsize); {
    __pyx_v_pointsize = __pyx_PyFloat_AsDouble(__pyx_arg_pointsize); if (unlikely((__pyx_v_pointsize == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Point.pointsize.__set__");
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":214
 *             return self._pointsize
 *         def __set__(self, float pointsize):
 *             if self._pointsize == pointsize:             # <<<<<<<<<<<<<<
 *                 return
 *             self._pointsize = pointsize
 */
  __pyx_t_1 = (((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_pointsize == __pyx_v_pointsize);
  if (__pyx_t_1) {

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":215
 *         def __set__(self, float pointsize):
 *             if self._pointsize == pointsize:
 *                 return             # <<<<<<<<<<<<<<
 *             self._pointsize = pointsize
 *             self.flag_update()
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":216
 *             if self._pointsize == pointsize:
 *                 return
 *             self._pointsize = pointsize             # <<<<<<<<<<<<<<
 *             self.flag_update()
 * 
 */
  ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->_pointsize = __pyx_v_pointsize;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":217
 *                 return
 *             self._pointsize = pointsize
 *             self.flag_update()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Point *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.flag_update(((struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Point.pointsize.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":230
 *     cdef list _points
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         VertexInstruction.__init__(self, **kwargs)
 *         self.points = kwargs.get('points', (0.0,0.0, 100.0,0.0, 50.0,100.0))
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_8Triangle_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_8Triangle_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":231
 * 
 *     def __init__(self, **kwargs):
 *         VertexInstruction.__init__(self, **kwargs)             # <<<<<<<<<<<<<<
 *         self.points = kwargs.get('points', (0.0,0.0, 100.0,0.0, 50.0,100.0))
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction)), __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_v_kwargs)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":232
 *     def __init__(self, **kwargs):
 *         VertexInstruction.__init__(self, **kwargs)
 *         self.points = kwargs.get('points', (0.0,0.0, 100.0,0.0, 50.0,100.0))             # <<<<<<<<<<<<<<
 * 
 *     cdef void build(self):
 */
  if (unlikely(__pyx_v_kwargs == Py_None)) {
    PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'get'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_3 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble(100.0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(50.0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyFloat_FromDouble(100.0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__points), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__points, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Triangle.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":234
 *         self.points = kwargs.get('points', (0.0,0.0, 100.0,0.0, 50.0,100.0))
 * 
 *     cdef void build(self):             # <<<<<<<<<<<<<<
 *         cdef list vc, tc
 *         cdef vertex_t vertices[3]
 */

static  void __pyx_f_4kivy_8graphics_19vertex_instructions_8Triangle_build(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *__pyx_v_self) {
  PyObject *__pyx_v_vc;
  PyObject *__pyx_v_tc;
  struct __pyx_t_4kivy_8graphics_6vertex_vertex_t __pyx_v_vertices[3];
  int *__pyx_v_indices;
  int __pyx_t_1[3];
  PyObject *__pyx_t_2 = NULL;
  float __pyx_t_3;
  __Pyx_RefNannySetupContext("build");
  __pyx_v_vc = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_tc = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":237
 *         cdef list vc, tc
 *         cdef vertex_t vertices[3]
 *         cdef int *indices = [0, 1, 2]             # <<<<<<<<<<<<<<
 * 
 *         vc = self.points;
 */
  __pyx_t_1[0] = 0;
  __pyx_t_1[1] = 1;
  __pyx_t_1[2] = 2;
  __pyx_v_indices = __pyx_t_1;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":239
 *         cdef int *indices = [0, 1, 2]
 * 
 *         vc = self.points;             # <<<<<<<<<<<<<<
 *         tc = self._tex_coords
 * 
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__points); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_vc));
  __pyx_v_vc = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":240
 * 
 *         vc = self.points;
 *         tc = self._tex_coords             # <<<<<<<<<<<<<<
 * 
 *         vertices[0].x = vc[0]
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._tex_coords));
  __Pyx_DECREF(((PyObject *)__pyx_v_tc));
  __pyx_v_tc = __pyx_v_self->__pyx_base._tex_coords;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":242
 *         tc = self._tex_coords
 * 
 *         vertices[0].x = vc[0]             # <<<<<<<<<<<<<<
 *         vertices[0].y = vc[1]
 *         vertices[0].s0 = tc[0]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[0]).x = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":243
 * 
 *         vertices[0].x = vc[0]
 *         vertices[0].y = vc[1]             # <<<<<<<<<<<<<<
 *         vertices[0].s0 = tc[0]
 *         vertices[0].t0 = tc[1]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[0]).y = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":244
 *         vertices[0].x = vc[0]
 *         vertices[0].y = vc[1]
 *         vertices[0].s0 = tc[0]             # <<<<<<<<<<<<<<
 *         vertices[0].t0 = tc[1]
 *         vertices[1].x = vc[2]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[0]).s0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":245
 *         vertices[0].y = vc[1]
 *         vertices[0].s0 = tc[0]
 *         vertices[0].t0 = tc[1]             # <<<<<<<<<<<<<<
 *         vertices[1].x = vc[2]
 *         vertices[1].y = vc[3]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[0]).t0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":246
 *         vertices[0].s0 = tc[0]
 *         vertices[0].t0 = tc[1]
 *         vertices[1].x = vc[2]             # <<<<<<<<<<<<<<
 *         vertices[1].y = vc[3]
 *         vertices[1].s0 = tc[2]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[1]).x = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":247
 *         vertices[0].t0 = tc[1]
 *         vertices[1].x = vc[2]
 *         vertices[1].y = vc[3]             # <<<<<<<<<<<<<<
 *         vertices[1].s0 = tc[2]
 *         vertices[1].t0 = tc[3]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[1]).y = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":248
 *         vertices[1].x = vc[2]
 *         vertices[1].y = vc[3]
 *         vertices[1].s0 = tc[2]             # <<<<<<<<<<<<<<
 *         vertices[1].t0 = tc[3]
 *         vertices[2].x = vc[4]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[1]).s0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":249
 *         vertices[1].y = vc[3]
 *         vertices[1].s0 = tc[2]
 *         vertices[1].t0 = tc[3]             # <<<<<<<<<<<<<<
 *         vertices[2].x = vc[4]
 *         vertices[2].y = vc[5]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[1]).t0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":250
 *         vertices[1].s0 = tc[2]
 *         vertices[1].t0 = tc[3]
 *         vertices[2].x = vc[4]             # <<<<<<<<<<<<<<
 *         vertices[2].y = vc[5]
 *         vertices[2].s0 = tc[4]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[2]).x = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":251
 *         vertices[1].t0 = tc[3]
 *         vertices[2].x = vc[4]
 *         vertices[2].y = vc[5]             # <<<<<<<<<<<<<<
 *         vertices[2].s0 = tc[4]
 *         vertices[2].t0 = tc[5]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[2]).y = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":252
 *         vertices[2].x = vc[4]
 *         vertices[2].y = vc[5]
 *         vertices[2].s0 = tc[4]             # <<<<<<<<<<<<<<
 *         vertices[2].t0 = tc[5]
 * 
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[2]).s0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":253
 *         vertices[2].y = vc[5]
 *         vertices[2].s0 = tc[4]
 *         vertices[2].t0 = tc[5]             # <<<<<<<<<<<<<<
 * 
 *         self.batch.set_data(vertices, 3, indices, 3)
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[2]).t0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":255
 *         vertices[2].t0 = tc[5]
 * 
 *         self.batch.set_data(vertices, 3, indices, 3)             # <<<<<<<<<<<<<<
 * 
 *     property points:
 */
  ((struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VertexBatch *)__pyx_v_self->__pyx_base.batch->__pyx_vtab)->set_data(__pyx_v_self->__pyx_base.batch, __pyx_v_vertices, 3, __pyx_v_indices, 3);

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("kivy.graphics.vertex_instructions.Triangle.build");
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_vc);
  __Pyx_DECREF(__pyx_v_tc);
  __Pyx_RefNannyFinishContext();
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":260
 *         '''Property for getting/settings points of the triangle
 *         '''
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._points
 *         def __set__(self, points):
 */

static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_8Triangle_6points_0__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_8Triangle_6points_0__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":261
 *         '''
 *         def __get__(self):
 *             return self._points             # <<<<<<<<<<<<<<
 *         def __set__(self, points):
 *             self._points = list(points)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *)__pyx_v_self)->_points));
  __pyx_r = ((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *)__pyx_v_self)->_points);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":262
 *         def __get__(self):
 *             return self._points
 *         def __set__(self, points):             # <<<<<<<<<<<<<<
 *             self._points = list(points)
 *             self.flag_update()
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_8Triangle_6points_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_points); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_8Triangle_6points_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_points) {
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__set__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":263
 *             return self._points
 *         def __set__(self, points):
 *             self._points = list(points)             # <<<<<<<<<<<<<<
 *             self.flag_update()
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_v_points);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_points);
  __Pyx_GIVEREF(__pyx_v_points);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *)__pyx_v_self)->_points);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *)__pyx_v_self)->_points));
  ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *)__pyx_v_self)->_points = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":264
 *         def __set__(self, points):
 *             self._points = list(points)
 *             self.flag_update()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Triangle *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.flag_update(((struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Triangle.points.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":276
 *     cdef list _points
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         VertexInstruction.__init__(self)
 *         self.points = kwargs.get('points',
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_4Quad_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_4Quad_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":277
 * 
 *     def __init__(self, **kwargs):
 *         VertexInstruction.__init__(self)             # <<<<<<<<<<<<<<
 *         self.points = kwargs.get('points',
 *                (  0.0,  50.0,   50.0,   0.0,
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction)), __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":278
 *     def __init__(self, **kwargs):
 *         VertexInstruction.__init__(self)
 *         self.points = kwargs.get('points',             # <<<<<<<<<<<<<<
 *                (  0.0,  50.0,   50.0,   0.0,
 *                 100.0,  50.0,   50.0, 100.0 ))
 */
  if (unlikely(__pyx_v_kwargs == Py_None)) {
    PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'get'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":279
 *         VertexInstruction.__init__(self)
 *         self.points = kwargs.get('points',
 *                (  0.0,  50.0,   50.0,   0.0,             # <<<<<<<<<<<<<<
 *                 100.0,  50.0,   50.0, 100.0 ))
 * 
 */
  __pyx_t_3 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyFloat_FromDouble(50.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble(50.0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":280
 *         self.points = kwargs.get('points',
 *                (  0.0,  50.0,   50.0,   0.0,
 *                 100.0,  50.0,   50.0, 100.0 ))             # <<<<<<<<<<<<<<
 * 
 *     cdef void build(self):
 */
  __pyx_t_5 = PyFloat_FromDouble(100.0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyFloat_FromDouble(50.0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyFloat_FromDouble(50.0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyFloat_FromDouble(100.0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = PyTuple_New(8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__points), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":278
 *     def __init__(self, **kwargs):
 *         VertexInstruction.__init__(self)
 *         self.points = kwargs.get('points',             # <<<<<<<<<<<<<<
 *                (  0.0,  50.0,   50.0,   0.0,
 *                 100.0,  50.0,   50.0, 100.0 ))
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__points, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Quad.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":282
 *                 100.0,  50.0,   50.0, 100.0 ))
 * 
 *     cdef void build(self):             # <<<<<<<<<<<<<<
 *         cdef list vc, tc
 *         cdef vertex_t vertices[4]
 */

static  void __pyx_f_4kivy_8graphics_19vertex_instructions_4Quad_build(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *__pyx_v_self) {
  PyObject *__pyx_v_vc;
  PyObject *__pyx_v_tc;
  struct __pyx_t_4kivy_8graphics_6vertex_vertex_t __pyx_v_vertices[4];
  int *__pyx_v_indices;
  int __pyx_t_1[6];
  PyObject *__pyx_t_2 = NULL;
  float __pyx_t_3;
  __Pyx_RefNannySetupContext("build");
  __pyx_v_vc = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  __pyx_v_tc = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":285
 *         cdef list vc, tc
 *         cdef vertex_t vertices[4]
 *         cdef int *indices = [0, 1, 2, 2, 3, 0]             # <<<<<<<<<<<<<<
 * 
 *         vc = self.points
 */
  __pyx_t_1[0] = 0;
  __pyx_t_1[1] = 1;
  __pyx_t_1[2] = 2;
  __pyx_t_1[3] = 2;
  __pyx_t_1[4] = 3;
  __pyx_t_1[5] = 0;
  __pyx_v_indices = __pyx_t_1;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":287
 *         cdef int *indices = [0, 1, 2, 2, 3, 0]
 * 
 *         vc = self.points             # <<<<<<<<<<<<<<
 *         tc = self._tex_coords
 * 
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__points); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_vc));
  __pyx_v_vc = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":288
 * 
 *         vc = self.points
 *         tc = self._tex_coords             # <<<<<<<<<<<<<<
 * 
 *         vertices[0].x = vc[0]
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._tex_coords));
  __Pyx_DECREF(((PyObject *)__pyx_v_tc));
  __pyx_v_tc = __pyx_v_self->__pyx_base._tex_coords;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":290
 *         tc = self._tex_coords
 * 
 *         vertices[0].x = vc[0]             # <<<<<<<<<<<<<<
 *         vertices[0].y = vc[1]
 *         vertices[0].s0 = tc[0]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[0]).x = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":291
 * 
 *         vertices[0].x = vc[0]
 *         vertices[0].y = vc[1]             # <<<<<<<<<<<<<<
 *         vertices[0].s0 = tc[0]
 *         vertices[0].t0 = tc[1]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[0]).y = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":292
 *         vertices[0].x = vc[0]
 *         vertices[0].y = vc[1]
 *         vertices[0].s0 = tc[0]             # <<<<<<<<<<<<<<
 *         vertices[0].t0 = tc[1]
 *         vertices[1].x = vc[2]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[0]).s0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":293
 *         vertices[0].y = vc[1]
 *         vertices[0].s0 = tc[0]
 *         vertices[0].t0 = tc[1]             # <<<<<<<<<<<<<<
 *         vertices[1].x = vc[2]
 *         vertices[1].y = vc[3]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[0]).t0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":294
 *         vertices[0].s0 = tc[0]
 *         vertices[0].t0 = tc[1]
 *         vertices[1].x = vc[2]             # <<<<<<<<<<<<<<
 *         vertices[1].y = vc[3]
 *         vertices[1].s0 = tc[2]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[1]).x = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":295
 *         vertices[0].t0 = tc[1]
 *         vertices[1].x = vc[2]
 *         vertices[1].y = vc[3]             # <<<<<<<<<<<<<<
 *         vertices[1].s0 = tc[2]
 *         vertices[1].t0 = tc[3]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[1]).y = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":296
 *         vertices[1].x = vc[2]
 *         vertices[1].y = vc[3]
 *         vertices[1].s0 = tc[2]             # <<<<<<<<<<<<<<
 *         vertices[1].t0 = tc[3]
 *         vertices[2].x = vc[4]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[1]).s0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":297
 *         vertices[1].y = vc[3]
 *         vertices[1].s0 = tc[2]
 *         vertices[1].t0 = tc[3]             # <<<<<<<<<<<<<<
 *         vertices[2].x = vc[4]
 *         vertices[2].y = vc[5]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[1]).t0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":298
 *         vertices[1].s0 = tc[2]
 *         vertices[1].t0 = tc[3]
 *         vertices[2].x = vc[4]             # <<<<<<<<<<<<<<
 *         vertices[2].y = vc[5]
 *         vertices[2].s0 = tc[4]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[2]).x = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":299
 *         vertices[1].t0 = tc[3]
 *         vertices[2].x = vc[4]
 *         vertices[2].y = vc[5]             # <<<<<<<<<<<<<<
 *         vertices[2].s0 = tc[4]
 *         vertices[2].t0 = tc[5]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[2]).y = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":300
 *         vertices[2].x = vc[4]
 *         vertices[2].y = vc[5]
 *         vertices[2].s0 = tc[4]             # <<<<<<<<<<<<<<
 *         vertices[2].t0 = tc[5]
 *         vertices[3].x = vc[6]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[2]).s0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":301
 *         vertices[2].y = vc[5]
 *         vertices[2].s0 = tc[4]
 *         vertices[2].t0 = tc[5]             # <<<<<<<<<<<<<<
 *         vertices[3].x = vc[6]
 *         vertices[3].y = vc[7]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[2]).t0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":302
 *         vertices[2].s0 = tc[4]
 *         vertices[2].t0 = tc[5]
 *         vertices[3].x = vc[6]             # <<<<<<<<<<<<<<
 *         vertices[3].y = vc[7]
 *         vertices[3].s0 = tc[6]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[3]).x = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":303
 *         vertices[2].t0 = tc[5]
 *         vertices[3].x = vc[6]
 *         vertices[3].y = vc[7]             # <<<<<<<<<<<<<<
 *         vertices[3].s0 = tc[6]
 *         vertices[3].t0 = tc[7]
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_vc), 7, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[3]).y = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":304
 *         vertices[3].x = vc[6]
 *         vertices[3].y = vc[7]
 *         vertices[3].s0 = tc[6]             # <<<<<<<<<<<<<<
 *         vertices[3].t0 = tc[7]
 * 
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[3]).s0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":305
 *         vertices[3].y = vc[7]
 *         vertices[3].s0 = tc[6]
 *         vertices[3].t0 = tc[7]             # <<<<<<<<<<<<<<
 * 
 *         self.batch.set_data(vertices, 4, indices, 6)
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 7, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (__pyx_v_vertices[3]).t0 = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":307
 *         vertices[3].t0 = tc[7]
 * 
 *         self.batch.set_data(vertices, 4, indices, 6)             # <<<<<<<<<<<<<<
 * 
 *     property points:
 */
  ((struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VertexBatch *)__pyx_v_self->__pyx_base.batch->__pyx_vtab)->set_data(__pyx_v_self->__pyx_base.batch, __pyx_v_vertices, 4, __pyx_v_indices, 6);

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("kivy.graphics.vertex_instructions.Quad.build");
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_vc);
  __Pyx_DECREF(__pyx_v_tc);
  __Pyx_RefNannyFinishContext();
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":312
 *         '''Property for getting/settings points of the quads
 *         '''
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._points
 *         def __set__(self, points):
 */

static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_4Quad_6points_0__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_4Quad_6points_0__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":313
 *         '''
 *         def __get__(self):
 *             return self._points             # <<<<<<<<<<<<<<
 *         def __set__(self, points):
 *             self._points = list(points)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *)__pyx_v_self)->_points));
  __pyx_r = ((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *)__pyx_v_self)->_points);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":314
 *         def __get__(self):
 *             return self._points
 *         def __set__(self, points):             # <<<<<<<<<<<<<<
 *             self._points = list(points)
 *             self.flag_update()
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_4Quad_6points_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_points); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_4Quad_6points_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_points) {
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__set__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":315
 *             return self._points
 *         def __set__(self, points):
 *             self._points = list(points)             # <<<<<<<<<<<<<<
 *             self.flag_update()
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_v_points);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_points);
  __Pyx_GIVEREF(__pyx_v_points);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *)__pyx_v_self)->_points);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *)__pyx_v_self)->_points));
  ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *)__pyx_v_self)->_points = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":316
 *         def __set__(self, points):
 *             self._points = list(points)
 *             self.flag_update()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Quad *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.flag_update(((struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Quad.points.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":330
 *     cdef float x,y,w,h
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         VertexInstruction.__init__(self, **kwargs)
 *         self.pos  = kwargs.get('pos',  (0,0))
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":331
 * 
 *     def __init__(self, **kwargs):
 *         VertexInstruction.__init__(self, **kwargs)             # <<<<<<<<<<<<<<
 *         self.pos  = kwargs.get('pos',  (0,0))
 *         self.size = kwargs.get('size', (100,100))
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction)), __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_v_kwargs)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":332
 *     def __init__(self, **kwargs):
 *         VertexInstruction.__init__(self, **kwargs)
 *         self.pos  = kwargs.get('pos',  (0,0))             # <<<<<<<<<<<<<<
 *         self.size = kwargs.get('size', (100,100))
 * 
 */
  if (unlikely(__pyx_v_kwargs == Py_None)) {
    PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'get'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_3 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_k_tuple_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__pos, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":333
 *         VertexInstruction.__init__(self, **kwargs)
 *         self.pos  = kwargs.get('pos',  (0,0))
 *         self.size = kwargs.get('size', (100,100))             # <<<<<<<<<<<<<<
 * 
 *     cdef void build(self):
 */
  if (unlikely(__pyx_v_kwargs == Py_None)) {
    PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'get'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_3 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__size), ((PyObject *)__pyx_k_tuple_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__size, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Rectangle.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":335
 *         self.size = kwargs.get('size', (100,100))
 * 
 *     cdef void build(self):             # <<<<<<<<<<<<<<
 *         cdef float x, y, w, h
 *         cdef list tc = self._tex_coords
 */

static  void __pyx_f_4kivy_8graphics_19vertex_instructions_9Rectangle_build(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *__pyx_v_self) {
  float __pyx_v_x;
  float __pyx_v_y;
  float __pyx_v_w;
  float __pyx_v_h;
  PyObject *__pyx_v_tc = 0;
  struct __pyx_t_4kivy_8graphics_6vertex_vertex_t __pyx_v_vertices[4];
  int *__pyx_v_indices;
  int __pyx_t_1[6];
  float __pyx_t_2;
  float __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("build");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":337
 *     cdef void build(self):
 *         cdef float x, y, w, h
 *         cdef list tc = self._tex_coords             # <<<<<<<<<<<<<<
 *         cdef vertex_t vertices[4]
 *         cdef int *indices = [0, 1, 2, 2, 3, 0]
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._tex_coords));
  __pyx_v_tc = __pyx_v_self->__pyx_base._tex_coords;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":339
 *         cdef list tc = self._tex_coords
 *         cdef vertex_t vertices[4]
 *         cdef int *indices = [0, 1, 2, 2, 3, 0]             # <<<<<<<<<<<<<<
 * 
 *         x, y = self.x, self.y
 */
  __pyx_t_1[0] = 0;
  __pyx_t_1[1] = 1;
  __pyx_t_1[2] = 2;
  __pyx_t_1[3] = 2;
  __pyx_t_1[4] = 3;
  __pyx_t_1[5] = 0;
  __pyx_v_indices = __pyx_t_1;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":341
 *         cdef int *indices = [0, 1, 2, 2, 3, 0]
 * 
 *         x, y = self.x, self.y             # <<<<<<<<<<<<<<
 *         w, h = self.w, self.h
 * 
 */
  __pyx_t_2 = __pyx_v_self->x;
  __pyx_t_3 = __pyx_v_self->y;
  __pyx_v_x = __pyx_t_2;
  __pyx_v_y = __pyx_t_3;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":342
 * 
 *         x, y = self.x, self.y
 *         w, h = self.w, self.h             # <<<<<<<<<<<<<<
 * 
 *         vertices[0].x = x
 */
  __pyx_t_3 = __pyx_v_self->w;
  __pyx_t_2 = __pyx_v_self->h;
  __pyx_v_w = __pyx_t_3;
  __pyx_v_h = __pyx_t_2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":344
 *         w, h = self.w, self.h
 * 
 *         vertices[0].x = x             # <<<<<<<<<<<<<<
 *         vertices[0].y = y
 *         vertices[0].s0 = tc[0]
 */
  (__pyx_v_vertices[0]).x = __pyx_v_x;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":345
 * 
 *         vertices[0].x = x
 *         vertices[0].y = y             # <<<<<<<<<<<<<<
 *         vertices[0].s0 = tc[0]
 *         vertices[0].t0 = tc[1]
 */
  (__pyx_v_vertices[0]).y = __pyx_v_y;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":346
 *         vertices[0].x = x
 *         vertices[0].y = y
 *         vertices[0].s0 = tc[0]             # <<<<<<<<<<<<<<
 *         vertices[0].t0 = tc[1]
 *         vertices[1].x = x + w
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_vertices[0]).s0 = __pyx_t_2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":347
 *         vertices[0].y = y
 *         vertices[0].s0 = tc[0]
 *         vertices[0].t0 = tc[1]             # <<<<<<<<<<<<<<
 *         vertices[1].x = x + w
 *         vertices[1].y = y
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_vertices[0]).t0 = __pyx_t_2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":348
 *         vertices[0].s0 = tc[0]
 *         vertices[0].t0 = tc[1]
 *         vertices[1].x = x + w             # <<<<<<<<<<<<<<
 *         vertices[1].y = y
 *         vertices[1].s0 = tc[2]
 */
  (__pyx_v_vertices[1]).x = (__pyx_v_x + __pyx_v_w);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":349
 *         vertices[0].t0 = tc[1]
 *         vertices[1].x = x + w
 *         vertices[1].y = y             # <<<<<<<<<<<<<<
 *         vertices[1].s0 = tc[2]
 *         vertices[1].t0 = tc[3]
 */
  (__pyx_v_vertices[1]).y = __pyx_v_y;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":350
 *         vertices[1].x = x + w
 *         vertices[1].y = y
 *         vertices[1].s0 = tc[2]             # <<<<<<<<<<<<<<
 *         vertices[1].t0 = tc[3]
 *         vertices[2].x = x + w
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_vertices[1]).s0 = __pyx_t_2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":351
 *         vertices[1].y = y
 *         vertices[1].s0 = tc[2]
 *         vertices[1].t0 = tc[3]             # <<<<<<<<<<<<<<
 *         vertices[2].x = x + w
 *         vertices[2].y = y + h
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_vertices[1]).t0 = __pyx_t_2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":352
 *         vertices[1].s0 = tc[2]
 *         vertices[1].t0 = tc[3]
 *         vertices[2].x = x + w             # <<<<<<<<<<<<<<
 *         vertices[2].y = y + h
 *         vertices[2].s0 = tc[4]
 */
  (__pyx_v_vertices[2]).x = (__pyx_v_x + __pyx_v_w);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":353
 *         vertices[1].t0 = tc[3]
 *         vertices[2].x = x + w
 *         vertices[2].y = y + h             # <<<<<<<<<<<<<<
 *         vertices[2].s0 = tc[4]
 *         vertices[2].t0 = tc[5]
 */
  (__pyx_v_vertices[2]).y = (__pyx_v_y + __pyx_v_h);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":354
 *         vertices[2].x = x + w
 *         vertices[2].y = y + h
 *         vertices[2].s0 = tc[4]             # <<<<<<<<<<<<<<
 *         vertices[2].t0 = tc[5]
 *         vertices[3].x = x
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_vertices[2]).s0 = __pyx_t_2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":355
 *         vertices[2].y = y + h
 *         vertices[2].s0 = tc[4]
 *         vertices[2].t0 = tc[5]             # <<<<<<<<<<<<<<
 *         vertices[3].x = x
 *         vertices[3].y = y + h
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_vertices[2]).t0 = __pyx_t_2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":356
 *         vertices[2].s0 = tc[4]
 *         vertices[2].t0 = tc[5]
 *         vertices[3].x = x             # <<<<<<<<<<<<<<
 *         vertices[3].y = y + h
 *         vertices[3].s0 = tc[6]
 */
  (__pyx_v_vertices[3]).x = __pyx_v_x;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":357
 *         vertices[2].t0 = tc[5]
 *         vertices[3].x = x
 *         vertices[3].y = y + h             # <<<<<<<<<<<<<<
 *         vertices[3].s0 = tc[6]
 *         vertices[3].t0 = tc[7]
 */
  (__pyx_v_vertices[3]).y = (__pyx_v_y + __pyx_v_h);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":358
 *         vertices[3].x = x
 *         vertices[3].y = y + h
 *         vertices[3].s0 = tc[6]             # <<<<<<<<<<<<<<
 *         vertices[3].t0 = tc[7]
 * 
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_vertices[3]).s0 = __pyx_t_2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":359
 *         vertices[3].y = y + h
 *         vertices[3].s0 = tc[6]
 *         vertices[3].t0 = tc[7]             # <<<<<<<<<<<<<<
 * 
 *         self.batch.set_data(vertices, 4, indices, 6)
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 7, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_vertices[3]).t0 = __pyx_t_2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":361
 *         vertices[3].t0 = tc[7]
 * 
 *         self.batch.set_data(vertices, 4, indices, 6)             # <<<<<<<<<<<<<<
 * 
 *     property pos:
 */
  ((struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VertexBatch *)__pyx_v_self->__pyx_base.batch->__pyx_vtab)->set_data(__pyx_v_self->__pyx_base.batch, __pyx_v_vertices, 4, __pyx_v_indices, 6);

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("kivy.graphics.vertex_instructions.Rectangle.build");
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tc);
  __Pyx_RefNannyFinishContext();
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":366
 *         '''Property for getting/settings the position of the rectangle
 *         '''
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return (self.x, self.y)
 *         def __set__(self, pos):
 */

static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_3pos_0__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_3pos_0__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":367
 *         '''
 *         def __get__(self):
 *             return (self.x, self.y)             # <<<<<<<<<<<<<<
 *         def __set__(self, pos):
 *             cdef float x, y
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->y); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Rectangle.pos.__get__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":368
 *         def __get__(self):
 *             return (self.x, self.y)
 *         def __set__(self, pos):             # <<<<<<<<<<<<<<
 *             cdef float x, y
 *             x, y = pos
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_3pos_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pos); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_3pos_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pos) {
  float __pyx_v_x;
  float __pyx_v_y;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  float __pyx_t_3;
  float __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("__set__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":370
 *         def __set__(self, pos):
 *             cdef float x, y
 *             x, y = pos             # <<<<<<<<<<<<<<
 *             if self.x == x and self.y == y:
 *                 return
 */
  if (PyTuple_CheckExact(__pyx_v_pos) && likely(PyTuple_GET_SIZE(__pyx_v_pos) == 2)) {
    PyObject* tuple = __pyx_v_pos;
    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_x = __pyx_t_3;
    __pyx_v_y = __pyx_t_4;
  } else {
    __pyx_t_5 = PyObject_GetIter(__pyx_v_pos); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_x = __pyx_t_4;
    __pyx_v_y = __pyx_t_3;
  }

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":371
 *             cdef float x, y
 *             x, y = pos
 *             if self.x == x and self.y == y:             # <<<<<<<<<<<<<<
 *                 return
 *             self.x = x
 */
  __pyx_t_6 = (((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->x == __pyx_v_x);
  if (__pyx_t_6) {
    __pyx_t_7 = (((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->y == __pyx_v_y);
    __pyx_t_8 = __pyx_t_7;
  } else {
    __pyx_t_8 = __pyx_t_6;
  }
  if (__pyx_t_8) {

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":372
 *             x, y = pos
 *             if self.x == x and self.y == y:
 *                 return             # <<<<<<<<<<<<<<
 *             self.x = x
 *             self.y = y
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":373
 *             if self.x == x and self.y == y:
 *                 return
 *             self.x = x             # <<<<<<<<<<<<<<
 *             self.y = y
 *             self.flag_update()
 */
  ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->x = __pyx_v_x;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":374
 *                 return
 *             self.x = x
 *             self.y = y             # <<<<<<<<<<<<<<
 *             self.flag_update()
 * 
 */
  ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->y = __pyx_v_y;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":375
 *             self.x = x
 *             self.y = y
 *             self.flag_update()             # <<<<<<<<<<<<<<
 * 
 *     property size:
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Rectangle *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.flag_update(((struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Rectangle.pos.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":380
 *         '''Property for getting/settings the size of the rectangle
 *         '''
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return (self.w, self.h)
 *         def __set__(self, size):
 */

static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_4size_0__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_4size_0__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":381
 *         '''
 *         def __get__(self):
 *             return (self.w, self.h)             # <<<<<<<<<<<<<<
 *         def __set__(self, size):
 *             cdef float w, h
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->w); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->h); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Rectangle.size.__get__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":382
 *         def __get__(self):
 *             return (self.w, self.h)
 *         def __set__(self, size):             # <<<<<<<<<<<<<<
 *             cdef float w, h
 *             w, h = size
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_4size_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_4size_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_size) {
  float __pyx_v_w;
  float __pyx_v_h;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  float __pyx_t_3;
  float __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("__set__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":384
 *         def __set__(self, size):
 *             cdef float w, h
 *             w, h = size             # <<<<<<<<<<<<<<
 *             if self.w == w and self.h == h:
 *                 return
 */
  if (PyTuple_CheckExact(__pyx_v_size) && likely(PyTuple_GET_SIZE(__pyx_v_size) == 2)) {
    PyObject* tuple = __pyx_v_size;
    __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_w = __pyx_t_3;
    __pyx_v_h = __pyx_t_4;
  } else {
    __pyx_t_5 = PyObject_GetIter(__pyx_v_size); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_w = __pyx_t_4;
    __pyx_v_h = __pyx_t_3;
  }

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":385
 *             cdef float w, h
 *             w, h = size
 *             if self.w == w and self.h == h:             # <<<<<<<<<<<<<<
 *                 return
 *             self.w = w
 */
  __pyx_t_6 = (((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->w == __pyx_v_w);
  if (__pyx_t_6) {
    __pyx_t_7 = (((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->h == __pyx_v_h);
    __pyx_t_8 = __pyx_t_7;
  } else {
    __pyx_t_8 = __pyx_t_6;
  }
  if (__pyx_t_8) {

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":386
 *             w, h = size
 *             if self.w == w and self.h == h:
 *                 return             # <<<<<<<<<<<<<<
 *             self.w = w
 *             self.h = h
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":387
 *             if self.w == w and self.h == h:
 *                 return
 *             self.w = w             # <<<<<<<<<<<<<<
 *             self.h = h
 *             self.flag_update()
 */
  ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->w = __pyx_v_w;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":388
 *                 return
 *             self.w = w
 *             self.h = h             # <<<<<<<<<<<<<<
 *             self.flag_update()
 * 
 */
  ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->h = __pyx_v_h;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":389
 *             self.w = w
 *             self.h = h
 *             self.flag_update()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Rectangle *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.flag_update(((struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Rectangle.size.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":404
 *     cdef list _border
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         Rectangle.__init__(self, **kwargs)
 *         self.border = kwargs.get('border', (10,10,10,10))
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_11BorderImage_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_11BorderImage_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":405
 * 
 *     def __init__(self, **kwargs):
 *         Rectangle.__init__(self, **kwargs)             # <<<<<<<<<<<<<<
 *         self.border = kwargs.get('border', (10,10,10,10))
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4kivy_8graphics_19vertex_instructions_Rectangle)), __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_v_kwargs)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":406
 *     def __init__(self, **kwargs):
 *         Rectangle.__init__(self, **kwargs)
 *         self.border = kwargs.get('border', (10,10,10,10))             # <<<<<<<<<<<<<<
 * 
 *     cdef void build(self):
 */
  if (unlikely(__pyx_v_kwargs == Py_None)) {
    PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'get'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_3 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__border), ((PyObject *)__pyx_k_tuple_7)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__border, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.BorderImage.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":408
 *         self.border = kwargs.get('border', (10,10,10,10))
 * 
 *     cdef void build(self):             # <<<<<<<<<<<<<<
 *         if not self.texture:
 *             Logger.trace('GBorderImage: texture missing')
 */

static  void __pyx_f_4kivy_8graphics_19vertex_instructions_11BorderImage_build(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *__pyx_v_self) {
  float __pyx_v_x;
  float __pyx_v_y;
  float __pyx_v_w;
  float __pyx_v_h;
  float __pyx_v_tw;
  float __pyx_v_th;
  float __pyx_v_tcw;
  float __pyx_v_tch;
  PyObject *__pyx_v_tc = 0;
  PyObject *__pyx_v_tsize;
  PyObject *__pyx_v_b = 0;
  float __pyx_v_tb[4];
  float __pyx_v_hs[4];
  float __pyx_v_vs[4];
  float __pyx_v_ths[4];
  float __pyx_v_tvs[4];
  float *__pyx_v_vertices;
  int *__pyx_v_indices;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  float __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  float __pyx_t_7[64];
  int __pyx_t_8[54];
  __Pyx_RefNannySetupContext("build");
  __pyx_v_tsize = Py_None; __Pyx_INCREF(Py_None);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":409
 * 
 *     cdef void build(self):
 *         if not self.texture:             # <<<<<<<<<<<<<<
 *             Logger.trace('GBorderImage: texture missing')
 *             return
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__texture); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":410
 *     cdef void build(self):
 *         if not self.texture:
 *             Logger.trace('GBorderImage: texture missing')             # <<<<<<<<<<<<<<
 *             return
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__trace); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":411
 *         if not self.texture:
 *             Logger.trace('GBorderImage: texture missing')
 *             return             # <<<<<<<<<<<<<<
 * 
 *         # pos and size of border rectangle
 */
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":415
 *         # pos and size of border rectangle
 *         cdef float x, y, w, h
 *         x = self.x             # <<<<<<<<<<<<<<
 *         y = self.y
 *         w = self.w
 */
  __pyx_v_x = __pyx_v_self->__pyx_base.x;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":416
 *         cdef float x, y, w, h
 *         x = self.x
 *         y = self.y             # <<<<<<<<<<<<<<
 *         w = self.w
 *         h=self.h
 */
  __pyx_v_y = __pyx_v_self->__pyx_base.y;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":417
 *         x = self.x
 *         y = self.y
 *         w = self.w             # <<<<<<<<<<<<<<
 *         h=self.h
 * 
 */
  __pyx_v_w = __pyx_v_self->__pyx_base.w;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":418
 *         y = self.y
 *         w = self.w
 *         h=self.h             # <<<<<<<<<<<<<<
 * 
 *         # width and heigth of texture in pixels, and tex coord space
 */
  __pyx_v_h = __pyx_v_self->__pyx_base.h;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":422
 *         # width and heigth of texture in pixels, and tex coord space
 *         cdef float tw, th, tcw, tch
 *         cdef list tc = self._tex_coords             # <<<<<<<<<<<<<<
 *         tsize  = self.texture.size
 *         tw  = tsize[0]
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._tex_coords));
  __pyx_v_tc = __pyx_v_self->__pyx_base.__pyx_base._tex_coords;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":423
 *         cdef float tw, th, tcw, tch
 *         cdef list tc = self._tex_coords
 *         tsize  = self.texture.size             # <<<<<<<<<<<<<<
 *         tw  = tsize[0]
 *         th  = tsize[1]
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__texture); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_tsize);
  __pyx_v_tsize = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":424
 *         cdef list tc = self._tex_coords
 *         tsize  = self.texture.size
 *         tw  = tsize[0]             # <<<<<<<<<<<<<<
 *         th  = tsize[1]
 *         tcw = tc[2] - tc[0]  #right - left
 */
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_tsize, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_tw = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":425
 *         tsize  = self.texture.size
 *         tw  = tsize[0]
 *         th  = tsize[1]             # <<<<<<<<<<<<<<
 *         tcw = tc[2] - tc[0]  #right - left
 *         tch = tc[7] - tc[1]  #top - bottom
 */
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_tsize, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_th = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":426
 *         tw  = tsize[0]
 *         th  = tsize[1]
 *         tcw = tc[2] - tc[0]  #right - left             # <<<<<<<<<<<<<<
 *         tch = tc[7] - tc[1]  #top - bottom
 * 
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_Subtract(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_tcw = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":427
 *         th  = tsize[1]
 *         tcw = tc[2] - tc[0]  #right - left
 *         tch = tc[7] - tc[1]  #top - bottom             # <<<<<<<<<<<<<<
 * 
 *         # calculate border offset in texture coord space
 */
  __pyx_t_6 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 7, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_tch = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":431
 *         # calculate border offset in texture coord space
 *         # border width(px)/texture width(px) *  tcoord width
 *         cdef list b = self._border             # <<<<<<<<<<<<<<
 *         cdef float tb[4] # border offset in texture coordinate space
 *         tb[0] = b[0] / th * tch
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_border));
  __pyx_v_b = __pyx_v_self->_border;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":433
 *         cdef list b = self._border
 *         cdef float tb[4] # border offset in texture coordinate space
 *         tb[0] = b[0] / th * tch             # <<<<<<<<<<<<<<
 *         tb[1] = b[1] / tw * tcw
 *         tb[2] = b[2] / th * tch
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_b), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_th); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_tch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_tb[0]) = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":434
 *         cdef float tb[4] # border offset in texture coordinate space
 *         tb[0] = b[0] / th * tch
 *         tb[1] = b[1] / tw * tcw             # <<<<<<<<<<<<<<
 *         tb[2] = b[2] / th * tch
 *         tb[3] = b[3] / tw * tcw
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_b), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_tw); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_tcw); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_tb[1]) = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":435
 *         tb[0] = b[0] / th * tch
 *         tb[1] = b[1] / tw * tcw
 *         tb[2] = b[2] / th * tch             # <<<<<<<<<<<<<<
 *         tb[3] = b[3] / tw * tcw
 * 
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_b), 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_th); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_tch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_tb[2]) = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":436
 *         tb[1] = b[1] / tw * tcw
 *         tb[2] = b[2] / th * tch
 *         tb[3] = b[3] / tw * tcw             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_b), 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_tw); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_tcw); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_tb[3]) = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":442
 *         cdef float hs[4]
 *         cdef float vs[4]
 *         hs[0] = x;            vs[0] = y             # <<<<<<<<<<<<<<
 *         hs[1] = x + b[3];     vs[1] = y + b[0]
 *         hs[2] = x + w - b[1]; vs[2] = y + h - b[2]
 */
  (__pyx_v_hs[0]) = __pyx_v_x;
  (__pyx_v_vs[0]) = __pyx_v_y;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":443
 *         cdef float vs[4]
 *         hs[0] = x;            vs[0] = y
 *         hs[1] = x + b[3];     vs[1] = y + b[0]             # <<<<<<<<<<<<<<
 *         hs[2] = x + w - b[1]; vs[2] = y + h - b[2]
 *         hs[3] = x + w;        vs[3] = y + h
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_b), 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  (__pyx_v_hs[1]) = __pyx_t_5;
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_b), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_vs[1]) = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":444
 *         hs[0] = x;            vs[0] = y
 *         hs[1] = x + b[3];     vs[1] = y + b[0]
 *         hs[2] = x + w - b[1]; vs[2] = y + h - b[2]             # <<<<<<<<<<<<<<
 *         hs[3] = x + w;        vs[3] = y + h
 * 
 */
  __pyx_t_4 = PyFloat_FromDouble((__pyx_v_x + __pyx_v_w)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_b), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_Subtract(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  (__pyx_v_hs[2]) = __pyx_t_5;
  __pyx_t_6 = PyFloat_FromDouble((__pyx_v_y + __pyx_v_h)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_b), 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_vs[2]) = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":445
 *         hs[1] = x + b[3];     vs[1] = y + b[0]
 *         hs[2] = x + w - b[1]; vs[2] = y + h - b[2]
 *         hs[3] = x + w;        vs[3] = y + h             # <<<<<<<<<<<<<<
 * 
 *         cdef float ths[4]
 */
  (__pyx_v_hs[3]) = (__pyx_v_x + __pyx_v_w);
  (__pyx_v_vs[3]) = (__pyx_v_y + __pyx_v_h);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":449
 *         cdef float ths[4]
 *         cdef float tvs[4]
 *         ths[0] = tc[0];              tvs[0] = tc[1]             # <<<<<<<<<<<<<<
 *         ths[1] = tc[0] + tb[3];      tvs[1] = tc[1] + tb[0]
 *         ths[2] = tc[0] + tcw-tb[1];  tvs[2] = tc[1] + tch - tb[2]
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_ths[0]) = __pyx_t_5;
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_tvs[0]) = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":450
 *         cdef float tvs[4]
 *         ths[0] = tc[0];              tvs[0] = tc[1]
 *         ths[1] = tc[0] + tb[3];      tvs[1] = tc[1] + tb[0]             # <<<<<<<<<<<<<<
 *         ths[2] = tc[0] + tcw-tb[1];  tvs[2] = tc[1] + tch - tb[2]
 *         ths[3] = tc[0] + tcw;        tvs[3] = tc[1] + tch
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_tb[3])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  (__pyx_v_ths[1]) = __pyx_t_5;
  __pyx_t_6 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_tb[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_tvs[1]) = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":451
 *         ths[0] = tc[0];              tvs[0] = tc[1]
 *         ths[1] = tc[0] + tb[3];      tvs[1] = tc[1] + tb[0]
 *         ths[2] = tc[0] + tcw-tb[1];  tvs[2] = tc[1] + tch - tb[2]             # <<<<<<<<<<<<<<
 *         ths[3] = tc[0] + tcw;        tvs[3] = tc[1] + tch
 * 
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_tcw); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_tb[1])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_ths[2]) = __pyx_t_5;
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_tch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_tb[2])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_tvs[2]) = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":452
 *         ths[1] = tc[0] + tb[3];      tvs[1] = tc[1] + tb[0]
 *         ths[2] = tc[0] + tcw-tb[1];  tvs[2] = tc[1] + tch - tb[2]
 *         ths[3] = tc[0] + tcw;        tvs[3] = tc[1] + tch             # <<<<<<<<<<<<<<
 * 
 *         '''
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_tcw); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  (__pyx_v_ths[3]) = __pyx_t_5;
  __pyx_t_6 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_tch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  (__pyx_v_tvs[3]) = __pyx_t_5;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":469
 *         # WARNING we are allocating the vertices as a float
 *         # because we know exactly the format.
 *         assert(sizeof(vertex_t) == 4 * sizeof(float))             # <<<<<<<<<<<<<<
 *         cdef float *vertices = [
 *             hs[0], vs[0], ths[0], tvs[0], #v0
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!((sizeof(struct __pyx_t_4kivy_8graphics_6vertex_vertex_t)) == (4 * (sizeof(float)))))) {
    PyErr_SetNone(PyExc_AssertionError);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":486
 *             hs[2], vs[1], ths[2], tvs[1], #v13
 *             hs[2], vs[2], ths[2], tvs[2], #v14
 *             hs[1], vs[2], ths[1], tvs[2]] #v15             # <<<<<<<<<<<<<<
 * 
 *         cdef int *indices = [
 */
  __pyx_t_7[0] = (__pyx_v_hs[0]);
  __pyx_t_7[1] = (__pyx_v_vs[0]);
  __pyx_t_7[2] = (__pyx_v_ths[0]);
  __pyx_t_7[3] = (__pyx_v_tvs[0]);
  __pyx_t_7[4] = (__pyx_v_hs[1]);
  __pyx_t_7[5] = (__pyx_v_vs[0]);
  __pyx_t_7[6] = (__pyx_v_ths[1]);
  __pyx_t_7[7] = (__pyx_v_tvs[0]);
  __pyx_t_7[8] = (__pyx_v_hs[2]);
  __pyx_t_7[9] = (__pyx_v_vs[0]);
  __pyx_t_7[10] = (__pyx_v_ths[2]);
  __pyx_t_7[11] = (__pyx_v_tvs[0]);
  __pyx_t_7[12] = (__pyx_v_hs[3]);
  __pyx_t_7[13] = (__pyx_v_vs[0]);
  __pyx_t_7[14] = (__pyx_v_ths[3]);
  __pyx_t_7[15] = (__pyx_v_tvs[0]);
  __pyx_t_7[16] = (__pyx_v_hs[3]);
  __pyx_t_7[17] = (__pyx_v_vs[1]);
  __pyx_t_7[18] = (__pyx_v_ths[3]);
  __pyx_t_7[19] = (__pyx_v_tvs[1]);
  __pyx_t_7[20] = (__pyx_v_hs[3]);
  __pyx_t_7[21] = (__pyx_v_vs[2]);
  __pyx_t_7[22] = (__pyx_v_ths[3]);
  __pyx_t_7[23] = (__pyx_v_tvs[2]);
  __pyx_t_7[24] = (__pyx_v_hs[3]);
  __pyx_t_7[25] = (__pyx_v_vs[3]);
  __pyx_t_7[26] = (__pyx_v_ths[3]);
  __pyx_t_7[27] = (__pyx_v_tvs[3]);
  __pyx_t_7[28] = (__pyx_v_hs[2]);
  __pyx_t_7[29] = (__pyx_v_vs[3]);
  __pyx_t_7[30] = (__pyx_v_ths[2]);
  __pyx_t_7[31] = (__pyx_v_tvs[3]);
  __pyx_t_7[32] = (__pyx_v_hs[1]);
  __pyx_t_7[33] = (__pyx_v_vs[3]);
  __pyx_t_7[34] = (__pyx_v_ths[1]);
  __pyx_t_7[35] = (__pyx_v_tvs[3]);
  __pyx_t_7[36] = (__pyx_v_hs[0]);
  __pyx_t_7[37] = (__pyx_v_vs[3]);
  __pyx_t_7[38] = (__pyx_v_ths[0]);
  __pyx_t_7[39] = (__pyx_v_tvs[3]);
  __pyx_t_7[40] = (__pyx_v_hs[0]);
  __pyx_t_7[41] = (__pyx_v_vs[2]);
  __pyx_t_7[42] = (__pyx_v_ths[0]);
  __pyx_t_7[43] = (__pyx_v_tvs[2]);
  __pyx_t_7[44] = (__pyx_v_hs[0]);
  __pyx_t_7[45] = (__pyx_v_vs[1]);
  __pyx_t_7[46] = (__pyx_v_ths[0]);
  __pyx_t_7[47] = (__pyx_v_tvs[1]);
  __pyx_t_7[48] = (__pyx_v_hs[1]);
  __pyx_t_7[49] = (__pyx_v_vs[1]);
  __pyx_t_7[50] = (__pyx_v_ths[1]);
  __pyx_t_7[51] = (__pyx_v_tvs[1]);
  __pyx_t_7[52] = (__pyx_v_hs[2]);
  __pyx_t_7[53] = (__pyx_v_vs[1]);
  __pyx_t_7[54] = (__pyx_v_ths[2]);
  __pyx_t_7[55] = (__pyx_v_tvs[1]);
  __pyx_t_7[56] = (__pyx_v_hs[2]);
  __pyx_t_7[57] = (__pyx_v_vs[2]);
  __pyx_t_7[58] = (__pyx_v_ths[2]);
  __pyx_t_7[59] = (__pyx_v_tvs[2]);
  __pyx_t_7[60] = (__pyx_v_hs[1]);
  __pyx_t_7[61] = (__pyx_v_vs[2]);
  __pyx_t_7[62] = (__pyx_v_ths[1]);
  __pyx_t_7[63] = (__pyx_v_tvs[2]);
  __pyx_v_vertices = __pyx_t_7;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":488
 *             hs[1], vs[2], ths[1], tvs[2]] #v15
 * 
 *         cdef int *indices = [             # <<<<<<<<<<<<<<
 *              0,  1, 12,    12, 11,  0,  # bottom left
 *              1,  2, 13,    13, 12,  1,  # bottom middle
 */
  __pyx_t_8[0] = 0;
  __pyx_t_8[1] = 1;
  __pyx_t_8[2] = 12;
  __pyx_t_8[3] = 12;
  __pyx_t_8[4] = 11;
  __pyx_t_8[5] = 0;
  __pyx_t_8[6] = 1;
  __pyx_t_8[7] = 2;
  __pyx_t_8[8] = 13;
  __pyx_t_8[9] = 13;
  __pyx_t_8[10] = 12;
  __pyx_t_8[11] = 1;
  __pyx_t_8[12] = 2;
  __pyx_t_8[13] = 3;
  __pyx_t_8[14] = 4;
  __pyx_t_8[15] = 4;
  __pyx_t_8[16] = 13;
  __pyx_t_8[17] = 2;
  __pyx_t_8[18] = 13;
  __pyx_t_8[19] = 4;
  __pyx_t_8[20] = 5;
  __pyx_t_8[21] = 5;
  __pyx_t_8[22] = 14;
  __pyx_t_8[23] = 13;
  __pyx_t_8[24] = 14;
  __pyx_t_8[25] = 5;
  __pyx_t_8[26] = 6;
  __pyx_t_8[27] = 6;
  __pyx_t_8[28] = 7;
  __pyx_t_8[29] = 14;
  __pyx_t_8[30] = 15;
  __pyx_t_8[31] = 14;
  __pyx_t_8[32] = 7;
  __pyx_t_8[33] = 7;
  __pyx_t_8[34] = 8;
  __pyx_t_8[35] = 15;
  __pyx_t_8[36] = 10;
  __pyx_t_8[37] = 15;
  __pyx_t_8[38] = 8;
  __pyx_t_8[39] = 8;
  __pyx_t_8[40] = 9;
  __pyx_t_8[41] = 10;
  __pyx_t_8[42] = 11;
  __pyx_t_8[43] = 12;
  __pyx_t_8[44] = 15;
  __pyx_t_8[45] = 15;
  __pyx_t_8[46] = 10;
  __pyx_t_8[47] = 11;
  __pyx_t_8[48] = 12;
  __pyx_t_8[49] = 13;
  __pyx_t_8[50] = 14;
  __pyx_t_8[51] = 14;
  __pyx_t_8[52] = 15;
  __pyx_t_8[53] = 12;
  __pyx_v_indices = __pyx_t_8;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":499
 *             12, 13, 14,    14, 15, 12]  # center middel
 * 
 *         self.batch.set_data(<vertex_t *>vertices, 16, indices, 54)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VertexBatch *)__pyx_v_self->__pyx_base.__pyx_base.batch->__pyx_vtab)->set_data(__pyx_v_self->__pyx_base.__pyx_base.batch, ((struct __pyx_t_4kivy_8graphics_6vertex_vertex_t *)__pyx_v_vertices), 16, __pyx_v_indices, 54);

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("kivy.graphics.vertex_instructions.BorderImage.build");
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tc);
  __Pyx_DECREF(__pyx_v_tsize);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_RefNannyFinishContext();
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":505
 *         '''Property for getting/setting the border of the class
 *         '''
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._border
 *         def __set__(self, b):
 */

static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_11BorderImage_6border_0__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_11BorderImage_6border_0__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("__get__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":506
 *         '''
 *         def __get__(self):
 *             return self._border             # <<<<<<<<<<<<<<
 *         def __set__(self, b):
 *             self._border = list(b)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *)__pyx_v_self)->_border));
  __pyx_r = ((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *)__pyx_v_self)->_border);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":507
 *         def __get__(self):
 *             return self._border
 *         def __set__(self, b):             # <<<<<<<<<<<<<<
 *             self._border = list(b)
 *             self.flag_update()
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_11BorderImage_6border_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_b); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_11BorderImage_6border_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_b) {
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__set__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":508
 *             return self._border
 *         def __set__(self, b):
 *             self._border = list(b)             # <<<<<<<<<<<<<<
 *             self.flag_update()
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_v_b);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_b);
  __Pyx_GIVEREF(__pyx_v_b);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *)__pyx_v_self)->_border);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *)__pyx_v_self)->_border));
  ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *)__pyx_v_self)->_border = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":509
 *         def __set__(self, b):
 *             self._border = list(b)
 *             self.flag_update()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_BorderImage *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.flag_update(((struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.BorderImage.border.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":522
 *     cdef int _segments
 * 
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         Rectangle.__init__(self, **kwargs)
 *         self._segments = kwargs.get('segments', 180)
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_7Ellipse_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_7Ellipse_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("__init__");
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":523
 * 
 *     def __init__(self, *args, **kwargs):
 *         Rectangle.__init__(self, **kwargs)             # <<<<<<<<<<<<<<
 *         self._segments = kwargs.get('segments', 180)
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4kivy_8graphics_19vertex_instructions_Rectangle)), __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_v_kwargs)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":524
 *     def __init__(self, *args, **kwargs):
 *         Rectangle.__init__(self, **kwargs)
 *         self._segments = kwargs.get('segments', 180)             # <<<<<<<<<<<<<<
 * 
 *     cdef void build(self):
 */
  if (unlikely(__pyx_v_kwargs == Py_None)) {
    PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'get'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_3 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__segments), __pyx_int_180); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Ellipse *)__pyx_v_self)->_segments = __pyx_t_4;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Ellipse.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":526
 *         self._segments = kwargs.get('segments', 180)
 * 
 *     cdef void build(self):             # <<<<<<<<<<<<<<
 *         cdef list tc = self.tex_coords
 *         cdef int i
 */

static  void __pyx_f_4kivy_8graphics_19vertex_instructions_7Ellipse_build(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Ellipse *__pyx_v_self) {
  PyObject *__pyx_v_tc = 0;
  int __pyx_v_i;
  float __pyx_v_x;
  float __pyx_v_y;
  float __pyx_v_angle;
  float __pyx_v_rx;
  float __pyx_v_ry;
  float __pyx_v_ttx;
  float __pyx_v_tty;
  float __pyx_v_tx;
  float __pyx_v_ty;
  float __pyx_v_tw;
  float __pyx_v_th;
  struct __pyx_t_4kivy_8graphics_6vertex_vertex_t *__pyx_v_vertices;
  int *__pyx_v_indices;
  int __pyx_v_count;
  PyObject *__pyx_t_1 = NULL;
  float __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  double __pyx_t_8;
  long __pyx_t_9;
  float __pyx_t_10;
  __Pyx_RefNannySetupContext("build");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":527
 * 
 *     cdef void build(self):
 *         cdef list tc = self.tex_coords             # <<<<<<<<<<<<<<
 *         cdef int i
 *         cdef float x, y, angle, rx, ry, ttx, tty, tx, ty, tw, th
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__tex_coords); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_tc = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":530
 *         cdef int i
 *         cdef float x, y, angle, rx, ry, ttx, tty, tx, ty, tw, th
 *         cdef vertex_t *vertices = NULL             # <<<<<<<<<<<<<<
 *         cdef int *indices = NULL
 *         cdef int count = self._segments
 */
  __pyx_v_vertices = NULL;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":531
 *         cdef float x, y, angle, rx, ry, ttx, tty, tx, ty, tw, th
 *         cdef vertex_t *vertices = NULL
 *         cdef int *indices = NULL             # <<<<<<<<<<<<<<
 *         cdef int count = self._segments
 * 
 */
  __pyx_v_indices = NULL;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":532
 *         cdef vertex_t *vertices = NULL
 *         cdef int *indices = NULL
 *         cdef int count = self._segments             # <<<<<<<<<<<<<<
 * 
 *         tx = tc[0]
 */
  __pyx_v_count = __pyx_v_self->_segments;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":534
 *         cdef int count = self._segments
 * 
 *         tx = tc[0]             # <<<<<<<<<<<<<<
 *         ty = tc[1]
 *         tw = tc[4] - tx
 */
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_tx = __pyx_t_2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":535
 * 
 *         tx = tc[0]
 *         ty = tc[1]             # <<<<<<<<<<<<<<
 *         tw = tc[4] - tx
 *         th = tc[5] - ty
 */
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ty = __pyx_t_2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":536
 *         tx = tc[0]
 *         ty = tc[1]
 *         tw = tc[4] - tx             # <<<<<<<<<<<<<<
 *         th = tc[5] - ty
 *         angle = 0.0
 */
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_tx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_tw = __pyx_t_2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":537
 *         ty = tc[1]
 *         tw = tc[4] - tx
 *         th = tc[5] - ty             # <<<<<<<<<<<<<<
 *         angle = 0.0
 *         rx = 0.5 * self.w
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tc), 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_ty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_th = __pyx_t_2;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":538
 *         tw = tc[4] - tx
 *         th = tc[5] - ty
 *         angle = 0.0             # <<<<<<<<<<<<<<
 *         rx = 0.5 * self.w
 *         ry = 0.5 * self.h
 */
  __pyx_v_angle = 0.0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":539
 *         th = tc[5] - ty
 *         angle = 0.0
 *         rx = 0.5 * self.w             # <<<<<<<<<<<<<<
 *         ry = 0.5 * self.h
 * 
 */
  __pyx_v_rx = (0.5 * __pyx_v_self->__pyx_base.w);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":540
 *         angle = 0.0
 *         rx = 0.5 * self.w
 *         ry = 0.5 * self.h             # <<<<<<<<<<<<<<
 * 
 *         vertices = <vertex_t *>malloc((count + 1) * sizeof(vertex_t))
 */
  __pyx_v_ry = (0.5 * __pyx_v_self->__pyx_base.h);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":542
 *         ry = 0.5 * self.h
 * 
 *         vertices = <vertex_t *>malloc((count + 1) * sizeof(vertex_t))             # <<<<<<<<<<<<<<
 *         if vertices == NULL:
 *             raise MemoryError('vertices')
 */
  __pyx_v_vertices = ((struct __pyx_t_4kivy_8graphics_6vertex_vertex_t *)malloc(((__pyx_v_count + 1) * (sizeof(struct __pyx_t_4kivy_8graphics_6vertex_vertex_t)))));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":543
 * 
 *         vertices = <vertex_t *>malloc((count + 1) * sizeof(vertex_t))
 *         if vertices == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('vertices')
 * 
 */
  __pyx_t_5 = (__pyx_v_vertices == NULL);
  if (__pyx_t_5) {

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":544
 *         vertices = <vertex_t *>malloc((count + 1) * sizeof(vertex_t))
 *         if vertices == NULL:
 *             raise MemoryError('vertices')             # <<<<<<<<<<<<<<
 * 
 *         indices = <int *>malloc(3 * count * sizeof(int))
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":546
 *             raise MemoryError('vertices')
 * 
 *         indices = <int *>malloc(3 * count * sizeof(int))             # <<<<<<<<<<<<<<
 *         if indices == NULL:
 *             free(vertices)
 */
  __pyx_v_indices = ((int *)malloc(((3 * __pyx_v_count) * (sizeof(int)))));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":547
 * 
 *         indices = <int *>malloc(3 * count * sizeof(int))
 *         if indices == NULL:             # <<<<<<<<<<<<<<
 *             free(vertices)
 *             raise MemoryError('indices')
 */
  __pyx_t_5 = (__pyx_v_indices == NULL);
  if (__pyx_t_5) {

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":548
 *         indices = <int *>malloc(3 * count * sizeof(int))
 *         if indices == NULL:
 *             free(vertices)             # <<<<<<<<<<<<<<
 *             raise MemoryError('indices')
 * 
 */
    free(__pyx_v_vertices);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":549
 *         if indices == NULL:
 *             free(vertices)
 *             raise MemoryError('indices')             # <<<<<<<<<<<<<<
 * 
 *         for i in xrange(count):
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":551
 *             raise MemoryError('indices')
 * 
 *         for i in xrange(count):             # <<<<<<<<<<<<<<
 *             # rad = deg * (pi / 180), where pi/180 = 0.0174...
 *             angle = i * 360.0/self._segments *0.017453292519943295
 */
  __pyx_t_6 = __pyx_v_count;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":553
 *         for i in xrange(count):
 *             # rad = deg * (pi / 180), where pi/180 = 0.0174...
 *             angle = i * 360.0/self._segments *0.017453292519943295             # <<<<<<<<<<<<<<
 *             x = (self.x+rx)+ (rx*cos(angle))
 *             y = (self.y+ry)+ (ry*sin(angle))
 */
    __pyx_t_8 = (__pyx_v_i * 360.0);
    if (unlikely(__pyx_v_self->_segments == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "float division");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_angle = ((__pyx_t_8 / __pyx_v_self->_segments) * 0.017453292519943295);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":554
 *             # rad = deg * (pi / 180), where pi/180 = 0.0174...
 *             angle = i * 360.0/self._segments *0.017453292519943295
 *             x = (self.x+rx)+ (rx*cos(angle))             # <<<<<<<<<<<<<<
 *             y = (self.y+ry)+ (ry*sin(angle))
 *             ttx = ((x-self.x)/self.w)*tw + tx
 */
    __pyx_v_x = ((__pyx_v_self->__pyx_base.x + __pyx_v_rx) + (__pyx_v_rx * cos(__pyx_v_angle)));

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":555
 *             angle = i * 360.0/self._segments *0.017453292519943295
 *             x = (self.x+rx)+ (rx*cos(angle))
 *             y = (self.y+ry)+ (ry*sin(angle))             # <<<<<<<<<<<<<<
 *             ttx = ((x-self.x)/self.w)*tw + tx
 *             tty = ((y-self.y)/self.h)*th + ty
 */
    __pyx_v_y = ((__pyx_v_self->__pyx_base.y + __pyx_v_ry) + (__pyx_v_ry * sin(__pyx_v_angle)));

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":556
 *             x = (self.x+rx)+ (rx*cos(angle))
 *             y = (self.y+ry)+ (ry*sin(angle))
 *             ttx = ((x-self.x)/self.w)*tw + tx             # <<<<<<<<<<<<<<
 *             tty = ((y-self.y)/self.h)*th + ty
 *             vertices[i].x = x
 */
    __pyx_t_2 = (__pyx_v_x - __pyx_v_self->__pyx_base.x);
    if (unlikely(__pyx_v_self->__pyx_base.w == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "float division");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_ttx = (((__pyx_t_2 / __pyx_v_self->__pyx_base.w) * __pyx_v_tw) + __pyx_v_tx);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":557
 *             y = (self.y+ry)+ (ry*sin(angle))
 *             ttx = ((x-self.x)/self.w)*tw + tx
 *             tty = ((y-self.y)/self.h)*th + ty             # <<<<<<<<<<<<<<
 *             vertices[i].x = x
 *             vertices[i].y = y
 */
    __pyx_t_2 = (__pyx_v_y - __pyx_v_self->__pyx_base.y);
    if (unlikely(__pyx_v_self->__pyx_base.h == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "float division");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_tty = (((__pyx_t_2 / __pyx_v_self->__pyx_base.h) * __pyx_v_th) + __pyx_v_ty);

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":558
 *             ttx = ((x-self.x)/self.w)*tw + tx
 *             tty = ((y-self.y)/self.h)*th + ty
 *             vertices[i].x = x             # <<<<<<<<<<<<<<
 *             vertices[i].y = y
 *             vertices[i].s0 = ttx
 */
    (__pyx_v_vertices[__pyx_v_i]).x = __pyx_v_x;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":559
 *             tty = ((y-self.y)/self.h)*th + ty
 *             vertices[i].x = x
 *             vertices[i].y = y             # <<<<<<<<<<<<<<
 *             vertices[i].s0 = ttx
 *             vertices[i].t0 = tty
 */
    (__pyx_v_vertices[__pyx_v_i]).y = __pyx_v_y;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":560
 *             vertices[i].x = x
 *             vertices[i].y = y
 *             vertices[i].s0 = ttx             # <<<<<<<<<<<<<<
 *             vertices[i].t0 = tty
 *             indices[i * 3] = i
 */
    (__pyx_v_vertices[__pyx_v_i]).s0 = __pyx_v_ttx;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":561
 *             vertices[i].y = y
 *             vertices[i].s0 = ttx
 *             vertices[i].t0 = tty             # <<<<<<<<<<<<<<
 *             indices[i * 3] = i
 *             indices[i * 3 + 1] = count
 */
    (__pyx_v_vertices[__pyx_v_i]).t0 = __pyx_v_tty;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":562
 *             vertices[i].s0 = ttx
 *             vertices[i].t0 = tty
 *             indices[i * 3] = i             # <<<<<<<<<<<<<<
 *             indices[i * 3 + 1] = count
 *             indices[i * 3 + 2] = (i + 1) % count
 */
    (__pyx_v_indices[(__pyx_v_i * 3)]) = __pyx_v_i;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":563
 *             vertices[i].t0 = tty
 *             indices[i * 3] = i
 *             indices[i * 3 + 1] = count             # <<<<<<<<<<<<<<
 *             indices[i * 3 + 2] = (i + 1) % count
 * 
 */
    (__pyx_v_indices[((__pyx_v_i * 3) + 1)]) = __pyx_v_count;

    /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":564
 *             indices[i * 3] = i
 *             indices[i * 3 + 1] = count
 *             indices[i * 3 + 2] = (i + 1) % count             # <<<<<<<<<<<<<<
 * 
 *         #add last verte in the middle
 */
    __pyx_t_9 = (__pyx_v_i + 1);
    if (unlikely(__pyx_v_count == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (__pyx_v_indices[((__pyx_v_i * 3) + 2)]) = __Pyx_mod_long(__pyx_t_9, __pyx_v_count);
  }

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":567
 * 
 *         #add last verte in the middle
 *         x, y = self.x+rx, self.y+ry             # <<<<<<<<<<<<<<
 *         ttx = ((x-self.x)/self.w)*tw + tx
 *         tty = ((y-self.y)/self.h)*th + ty
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.x + __pyx_v_rx);
  __pyx_t_10 = (__pyx_v_self->__pyx_base.y + __pyx_v_ry);
  __pyx_v_x = __pyx_t_2;
  __pyx_v_y = __pyx_t_10;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":568
 *         #add last verte in the middle
 *         x, y = self.x+rx, self.y+ry
 *         ttx = ((x-self.x)/self.w)*tw + tx             # <<<<<<<<<<<<<<
 *         tty = ((y-self.y)/self.h)*th + ty
 *         vertices[count].x = x
 */
  __pyx_t_10 = (__pyx_v_x - __pyx_v_self->__pyx_base.x);
  if (unlikely(__pyx_v_self->__pyx_base.w == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_ttx = (((__pyx_t_10 / __pyx_v_self->__pyx_base.w) * __pyx_v_tw) + __pyx_v_tx);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":569
 *         x, y = self.x+rx, self.y+ry
 *         ttx = ((x-self.x)/self.w)*tw + tx
 *         tty = ((y-self.y)/self.h)*th + ty             # <<<<<<<<<<<<<<
 *         vertices[count].x = x
 *         vertices[count].y = y
 */
  __pyx_t_10 = (__pyx_v_y - __pyx_v_self->__pyx_base.y);
  if (unlikely(__pyx_v_self->__pyx_base.h == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_tty = (((__pyx_t_10 / __pyx_v_self->__pyx_base.h) * __pyx_v_th) + __pyx_v_ty);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":570
 *         ttx = ((x-self.x)/self.w)*tw + tx
 *         tty = ((y-self.y)/self.h)*th + ty
 *         vertices[count].x = x             # <<<<<<<<<<<<<<
 *         vertices[count].y = y
 *         vertices[count].s0 = ttx
 */
  (__pyx_v_vertices[__pyx_v_count]).x = __pyx_v_x;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":571
 *         tty = ((y-self.y)/self.h)*th + ty
 *         vertices[count].x = x
 *         vertices[count].y = y             # <<<<<<<<<<<<<<
 *         vertices[count].s0 = ttx
 *         vertices[count].t0 = tty
 */
  (__pyx_v_vertices[__pyx_v_count]).y = __pyx_v_y;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":572
 *         vertices[count].x = x
 *         vertices[count].y = y
 *         vertices[count].s0 = ttx             # <<<<<<<<<<<<<<
 *         vertices[count].t0 = tty
 * 
 */
  (__pyx_v_vertices[__pyx_v_count]).s0 = __pyx_v_ttx;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":573
 *         vertices[count].y = y
 *         vertices[count].s0 = ttx
 *         vertices[count].t0 = tty             # <<<<<<<<<<<<<<
 * 
 *         self.batch.set_data(vertices, count + 1, indices, count * 3)
 */
  (__pyx_v_vertices[__pyx_v_count]).t0 = __pyx_v_tty;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":575
 *         vertices[count].t0 = tty
 * 
 *         self.batch.set_data(vertices, count + 1, indices, count * 3)             # <<<<<<<<<<<<<<
 * 
 *         free(vertices)
 */
  ((struct __pyx_vtabstruct_4kivy_8graphics_3vbo_VertexBatch *)__pyx_v_self->__pyx_base.__pyx_base.batch->__pyx_vtab)->set_data(__pyx_v_self->__pyx_base.__pyx_base.batch, __pyx_v_vertices, (__pyx_v_count + 1), __pyx_v_indices, (__pyx_v_count * 3));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":577
 *         self.batch.set_data(vertices, count + 1, indices, count * 3)
 * 
 *         free(vertices)             # <<<<<<<<<<<<<<
 *         free(indices)
 * 
 */
  free(__pyx_v_vertices);

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":578
 * 
 *         free(vertices)
 *         free(indices)             # <<<<<<<<<<<<<<
 * 
 *     property segments:
 */
  free(__pyx_v_indices);

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("kivy.graphics.vertex_instructions.Ellipse.build");
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tc);
  __Pyx_RefNannyFinishContext();
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":583
 *         '''Property for getting/setting the number of segments of the ellipse
 *         '''
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._segments
 *         def __set__(self, value):
 */

static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_7Ellipse_8segments_0__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4kivy_8graphics_19vertex_instructions_7Ellipse_8segments_0__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":584
 *         '''
 *         def __get__(self):
 *             return self._segments             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self._segments = value
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Ellipse *)__pyx_v_self)->_segments); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Ellipse.segments.__get__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":585
 *         def __get__(self):
 *             return self._segments
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self._segments = value
 *             self.flag_update()
 */

static int __pyx_pf_4kivy_8graphics_19vertex_instructions_7Ellipse_8segments_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_4kivy_8graphics_19vertex_instructions_7Ellipse_8segments_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__set__");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":586
 *             return self._segments
 *         def __set__(self, value):
 *             self._segments = value             # <<<<<<<<<<<<<<
 *             self.flag_update()
 */
  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Ellipse *)__pyx_v_self)->_segments = __pyx_t_1;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":587
 *         def __set__(self, value):
 *             self._segments = value
 *             self.flag_update()             # <<<<<<<<<<<<<<
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Ellipse *)((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Ellipse *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.flag_update(((struct __pyx_obj_4kivy_8graphics_12instructions_Instruction *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.graphics.vertex_instructions.Ellipse.segments.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Line __pyx_vtable_4kivy_8graphics_19vertex_instructions_Line;

static PyObject *__pyx_tp_new_4kivy_8graphics_19vertex_instructions_Line(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *p;
  PyObject *o = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_new(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Instruction*)__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Line;
  p->_points = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_Line(PyObject *o) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *)o;
  Py_XDECREF(((PyObject *)p->_points));
  __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_dealloc(o);
}

static int __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_Line(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *)o;
  if (__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_traverse) {
    e = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_traverse(o, v, a); if (e) return e;
  }
  if (p->_points) {
    e = (*v)(p->_points, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_Line(PyObject *o) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line *)o;
  PyObject* tmp;
  if (__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_clear) {
    __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_clear(o);
  }
  tmp = ((PyObject*)p->_points);
  p->_points = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4kivy_8graphics_19vertex_instructions_4Line_points(PyObject *o, void *x) {
  return __pyx_pf_4kivy_8graphics_19vertex_instructions_4Line_6points_0__get__(o);
}

static int __pyx_setprop_4kivy_8graphics_19vertex_instructions_4Line_points(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_4kivy_8graphics_19vertex_instructions_4Line_6points_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4kivy_8graphics_19vertex_instructions_Line[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4kivy_8graphics_19vertex_instructions_Line[] = {
  {(char *)"points", __pyx_getprop_4kivy_8graphics_19vertex_instructions_4Line_points, __pyx_setprop_4kivy_8graphics_19vertex_instructions_4Line_points, __Pyx_DOCSTR(__pyx_k_12), 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Line = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Line = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Line = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Line = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

PyTypeObject __pyx_type_4kivy_8graphics_19vertex_instructions_Line = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("kivy.graphics.vertex_instructions.Line"), /*tp_name*/
  sizeof(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Line), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_Line, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Line, /*tp_as_number*/
  &__pyx_tp_as_sequence_Line, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Line, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Line, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("Line(**kwargs)\nA 2d line.\n\n    :Parameters:\n        `points`: list\n            List of points in the format (x1, y1, x2, y2...)\n    "), /*tp_doc*/
  __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_Line, /*tp_traverse*/
  __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_Line, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4kivy_8graphics_19vertex_instructions_Line, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4kivy_8graphics_19vertex_instructions_Line, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_4kivy_8graphics_19vertex_instructions_4Line_0__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4kivy_8graphics_19vertex_instructions_Line, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Point __pyx_vtable_4kivy_8graphics_19vertex_instructions_Point;

static PyObject *__pyx_tp_new_4kivy_8graphics_19vertex_instructions_Point(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *p;
  PyObject *o = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_new(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Instruction*)__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Point;
  p->_points = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_Point(PyObject *o) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)o;
  Py_XDECREF(((PyObject *)p->_points));
  __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_dealloc(o);
}

static int __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_Point(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)o;
  if (__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_traverse) {
    e = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_traverse(o, v, a); if (e) return e;
  }
  if (p->_points) {
    e = (*v)(p->_points, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_Point(PyObject *o) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point *)o;
  PyObject* tmp;
  if (__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_clear) {
    __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_clear(o);
  }
  tmp = ((PyObject*)p->_points);
  p->_points = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4kivy_8graphics_19vertex_instructions_5Point_points(PyObject *o, void *x) {
  return __pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_6points_0__get__(o);
}

static int __pyx_setprop_4kivy_8graphics_19vertex_instructions_5Point_points(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_6points_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4kivy_8graphics_19vertex_instructions_5Point_pointsize(PyObject *o, void *x) {
  return __pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_9pointsize_0__get__(o);
}

static int __pyx_setprop_4kivy_8graphics_19vertex_instructions_5Point_pointsize(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_9pointsize_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4kivy_8graphics_19vertex_instructions_Point[] = {
  {__Pyx_NAMESTR("add_point"), (PyCFunction)__pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_1add_point, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4kivy_8graphics_19vertex_instructions_5Point_1add_point)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4kivy_8graphics_19vertex_instructions_Point[] = {
  {(char *)"points", __pyx_getprop_4kivy_8graphics_19vertex_instructions_5Point_points, __pyx_setprop_4kivy_8graphics_19vertex_instructions_5Point_points, __Pyx_DOCSTR(__pyx_k_13), 0},
  {(char *)"pointsize", __pyx_getprop_4kivy_8graphics_19vertex_instructions_5Point_pointsize, __pyx_setprop_4kivy_8graphics_19vertex_instructions_5Point_pointsize, __Pyx_DOCSTR(__pyx_k_14), 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Point = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Point = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Point = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Point = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

PyTypeObject __pyx_type_4kivy_8graphics_19vertex_instructions_Point = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("kivy.graphics.vertex_instructions.Point"), /*tp_name*/
  sizeof(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Point), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_Point, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Point, /*tp_as_number*/
  &__pyx_tp_as_sequence_Point, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Point, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Point, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("Point(**kwargs)\nA 2d line.\n\n    :Parameters:\n        `points`: list\n            List of points in the format (x1, y1, x2, y2...)\n        `pointsize`: float, default to 1.\n            Size of the point (1. mean the real size will be 2)\n    "), /*tp_doc*/
  __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_Point, /*tp_traverse*/
  __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_Point, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4kivy_8graphics_19vertex_instructions_Point, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4kivy_8graphics_19vertex_instructions_Point, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_4kivy_8graphics_19vertex_instructions_5Point_0__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4kivy_8graphics_19vertex_instructions_Point, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Triangle __pyx_vtable_4kivy_8graphics_19vertex_instructions_Triangle;

static PyObject *__pyx_tp_new_4kivy_8graphics_19vertex_instructions_Triangle(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *p;
  PyObject *o = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_new(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Instruction*)__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Triangle;
  p->_points = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_Triangle(PyObject *o) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *)o;
  Py_XDECREF(((PyObject *)p->_points));
  __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_dealloc(o);
}

static int __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_Triangle(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *)o;
  if (__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_traverse) {
    e = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_traverse(o, v, a); if (e) return e;
  }
  if (p->_points) {
    e = (*v)(p->_points, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_Triangle(PyObject *o) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle *)o;
  PyObject* tmp;
  if (__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_clear) {
    __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_clear(o);
  }
  tmp = ((PyObject*)p->_points);
  p->_points = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4kivy_8graphics_19vertex_instructions_8Triangle_points(PyObject *o, void *x) {
  return __pyx_pf_4kivy_8graphics_19vertex_instructions_8Triangle_6points_0__get__(o);
}

static int __pyx_setprop_4kivy_8graphics_19vertex_instructions_8Triangle_points(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_4kivy_8graphics_19vertex_instructions_8Triangle_6points_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4kivy_8graphics_19vertex_instructions_Triangle[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4kivy_8graphics_19vertex_instructions_Triangle[] = {
  {(char *)"points", __pyx_getprop_4kivy_8graphics_19vertex_instructions_8Triangle_points, __pyx_setprop_4kivy_8graphics_19vertex_instructions_8Triangle_points, __Pyx_DOCSTR(__pyx_k_13), 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Triangle = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Triangle = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Triangle = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Triangle = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

PyTypeObject __pyx_type_4kivy_8graphics_19vertex_instructions_Triangle = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("kivy.graphics.vertex_instructions.Triangle"), /*tp_name*/
  sizeof(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Triangle), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_Triangle, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Triangle, /*tp_as_number*/
  &__pyx_tp_as_sequence_Triangle, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Triangle, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Triangle, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("Triangle(**kwargs)\nA 2d triangle.\n\n    :Parameters:\n        `points`: list\n            List of point in the format (x1, y1, x2, y2, x3, y3)\n    "), /*tp_doc*/
  __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_Triangle, /*tp_traverse*/
  __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_Triangle, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4kivy_8graphics_19vertex_instructions_Triangle, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4kivy_8graphics_19vertex_instructions_Triangle, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_4kivy_8graphics_19vertex_instructions_8Triangle_0__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4kivy_8graphics_19vertex_instructions_Triangle, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Quad __pyx_vtable_4kivy_8graphics_19vertex_instructions_Quad;

static PyObject *__pyx_tp_new_4kivy_8graphics_19vertex_instructions_Quad(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *p;
  PyObject *o = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_new(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Instruction*)__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Quad;
  p->_points = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_Quad(PyObject *o) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *)o;
  Py_XDECREF(((PyObject *)p->_points));
  __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_dealloc(o);
}

static int __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_Quad(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *)o;
  if (__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_traverse) {
    e = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_traverse(o, v, a); if (e) return e;
  }
  if (p->_points) {
    e = (*v)(p->_points, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_Quad(PyObject *o) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad *)o;
  PyObject* tmp;
  if (__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_clear) {
    __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_clear(o);
  }
  tmp = ((PyObject*)p->_points);
  p->_points = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4kivy_8graphics_19vertex_instructions_4Quad_points(PyObject *o, void *x) {
  return __pyx_pf_4kivy_8graphics_19vertex_instructions_4Quad_6points_0__get__(o);
}

static int __pyx_setprop_4kivy_8graphics_19vertex_instructions_4Quad_points(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_4kivy_8graphics_19vertex_instructions_4Quad_6points_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4kivy_8graphics_19vertex_instructions_Quad[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4kivy_8graphics_19vertex_instructions_Quad[] = {
  {(char *)"points", __pyx_getprop_4kivy_8graphics_19vertex_instructions_4Quad_points, __pyx_setprop_4kivy_8graphics_19vertex_instructions_4Quad_points, __Pyx_DOCSTR(__pyx_k_15), 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Quad = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Quad = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Quad = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Quad = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

PyTypeObject __pyx_type_4kivy_8graphics_19vertex_instructions_Quad = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("kivy.graphics.vertex_instructions.Quad"), /*tp_name*/
  sizeof(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Quad), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_Quad, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Quad, /*tp_as_number*/
  &__pyx_tp_as_sequence_Quad, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Quad, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Quad, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("Quad(**kwargs)\nA 2d quad.\n\n    :Parameters:\n        `points`: list\n            List of point in the format (x1, y1, x2, y2, x3, y3, x4, y4)\n    "), /*tp_doc*/
  __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_Quad, /*tp_traverse*/
  __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_Quad, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4kivy_8graphics_19vertex_instructions_Quad, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4kivy_8graphics_19vertex_instructions_Quad, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_4kivy_8graphics_19vertex_instructions_4Quad_0__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4kivy_8graphics_19vertex_instructions_Quad, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Rectangle __pyx_vtable_4kivy_8graphics_19vertex_instructions_Rectangle;

static PyObject *__pyx_tp_new_4kivy_8graphics_19vertex_instructions_Rectangle(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *p;
  PyObject *o = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_new(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Instruction*)__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Rectangle;
  return o;
}

static void __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_Rectangle(PyObject *o) {
  __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_dealloc(o);
}

static int __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_Rectangle(PyObject *o, visitproc v, void *a) {
  int e;
  if (__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_traverse) {
    e = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_traverse(o, v, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_Rectangle(PyObject *o) {
  if (__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_clear) {
    __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_clear(o);
  }
  return 0;
}

static PyObject *__pyx_getprop_4kivy_8graphics_19vertex_instructions_9Rectangle_pos(PyObject *o, void *x) {
  return __pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_3pos_0__get__(o);
}

static int __pyx_setprop_4kivy_8graphics_19vertex_instructions_9Rectangle_pos(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_3pos_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4kivy_8graphics_19vertex_instructions_9Rectangle_size(PyObject *o, void *x) {
  return __pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_4size_0__get__(o);
}

static int __pyx_setprop_4kivy_8graphics_19vertex_instructions_9Rectangle_size(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_4size_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4kivy_8graphics_19vertex_instructions_Rectangle[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4kivy_8graphics_19vertex_instructions_Rectangle[] = {
  {(char *)"pos", __pyx_getprop_4kivy_8graphics_19vertex_instructions_9Rectangle_pos, __pyx_setprop_4kivy_8graphics_19vertex_instructions_9Rectangle_pos, __Pyx_DOCSTR(__pyx_k_16), 0},
  {(char *)"size", __pyx_getprop_4kivy_8graphics_19vertex_instructions_9Rectangle_size, __pyx_setprop_4kivy_8graphics_19vertex_instructions_9Rectangle_size, __Pyx_DOCSTR(__pyx_k_17), 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Rectangle = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Rectangle = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Rectangle = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Rectangle = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

PyTypeObject __pyx_type_4kivy_8graphics_19vertex_instructions_Rectangle = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("kivy.graphics.vertex_instructions.Rectangle"), /*tp_name*/
  sizeof(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Rectangle), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_Rectangle, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Rectangle, /*tp_as_number*/
  &__pyx_tp_as_sequence_Rectangle, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Rectangle, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Rectangle, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("Rectangle(**kwargs)\nA 2d rectangle.\n\n    :Parameters:\n        `pos`: list\n            Position of the rectangle, in the format (x, y)\n        `size`: list\n            Size of the rectangle, in the format (width, height)\n    "), /*tp_doc*/
  __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_Rectangle, /*tp_traverse*/
  __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_Rectangle, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4kivy_8graphics_19vertex_instructions_Rectangle, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4kivy_8graphics_19vertex_instructions_Rectangle, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_4kivy_8graphics_19vertex_instructions_9Rectangle_0__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4kivy_8graphics_19vertex_instructions_Rectangle, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_BorderImage __pyx_vtable_4kivy_8graphics_19vertex_instructions_BorderImage;

static PyObject *__pyx_tp_new_4kivy_8graphics_19vertex_instructions_BorderImage(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *p;
  PyObject *o = __pyx_tp_new_4kivy_8graphics_19vertex_instructions_Rectangle(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Instruction*)__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_BorderImage;
  p->_border = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_BorderImage(PyObject *o) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *)o;
  Py_XDECREF(((PyObject *)p->_border));
  __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_Rectangle(o);
}

static int __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_BorderImage(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *)o;
  e = __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_Rectangle(o, v, a); if (e) return e;
  if (p->_border) {
    e = (*v)(p->_border, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_BorderImage(PyObject *o) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *p = (struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage *)o;
  PyObject* tmp;
  __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_Rectangle(o);
  tmp = ((PyObject*)p->_border);
  p->_border = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4kivy_8graphics_19vertex_instructions_11BorderImage_border(PyObject *o, void *x) {
  return __pyx_pf_4kivy_8graphics_19vertex_instructions_11BorderImage_6border_0__get__(o);
}

static int __pyx_setprop_4kivy_8graphics_19vertex_instructions_11BorderImage_border(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_4kivy_8graphics_19vertex_instructions_11BorderImage_6border_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4kivy_8graphics_19vertex_instructions_BorderImage[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4kivy_8graphics_19vertex_instructions_BorderImage[] = {
  {(char *)"border", __pyx_getprop_4kivy_8graphics_19vertex_instructions_11BorderImage_border, __pyx_setprop_4kivy_8graphics_19vertex_instructions_11BorderImage_border, __Pyx_DOCSTR(__pyx_k_18), 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_BorderImage = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_BorderImage = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_BorderImage = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_BorderImage = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

PyTypeObject __pyx_type_4kivy_8graphics_19vertex_instructions_BorderImage = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("kivy.graphics.vertex_instructions.BorderImage"), /*tp_name*/
  sizeof(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_BorderImage), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_BorderImage, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_BorderImage, /*tp_as_number*/
  &__pyx_tp_as_sequence_BorderImage, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_BorderImage, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_BorderImage, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("BorderImage(**kwargs)\nA 2d border image. The behavior of the border image is similar to the\n    concept of CSS3 border-image.\n\n    :Parameters:\n        `border`: list\n            Border information in the format (top, right, bottom, left).\n            Each value is in pixels.\n    "), /*tp_doc*/
  __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_BorderImage, /*tp_traverse*/
  __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_BorderImage, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4kivy_8graphics_19vertex_instructions_BorderImage, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4kivy_8graphics_19vertex_instructions_BorderImage, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_4kivy_8graphics_19vertex_instructions_11BorderImage_0__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4kivy_8graphics_19vertex_instructions_BorderImage, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_4kivy_8graphics_19vertex_instructions_Ellipse __pyx_vtable_4kivy_8graphics_19vertex_instructions_Ellipse;

static PyObject *__pyx_tp_new_4kivy_8graphics_19vertex_instructions_Ellipse(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Ellipse *p;
  PyObject *o = __pyx_tp_new_4kivy_8graphics_19vertex_instructions_Rectangle(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Ellipse *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4kivy_8graphics_12instructions_Instruction*)__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Ellipse;
  return o;
}

static PyObject *__pyx_getprop_4kivy_8graphics_19vertex_instructions_7Ellipse_segments(PyObject *o, void *x) {
  return __pyx_pf_4kivy_8graphics_19vertex_instructions_7Ellipse_8segments_0__get__(o);
}

static int __pyx_setprop_4kivy_8graphics_19vertex_instructions_7Ellipse_segments(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_4kivy_8graphics_19vertex_instructions_7Ellipse_8segments_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4kivy_8graphics_19vertex_instructions_Ellipse[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4kivy_8graphics_19vertex_instructions_Ellipse[] = {
  {(char *)"segments", __pyx_getprop_4kivy_8graphics_19vertex_instructions_7Ellipse_segments, __pyx_setprop_4kivy_8graphics_19vertex_instructions_7Ellipse_segments, __Pyx_DOCSTR(__pyx_k_19), 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Ellipse = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Ellipse = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Ellipse = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Ellipse = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

PyTypeObject __pyx_type_4kivy_8graphics_19vertex_instructions_Ellipse = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("kivy.graphics.vertex_instructions.Ellipse"), /*tp_name*/
  sizeof(struct __pyx_obj_4kivy_8graphics_19vertex_instructions_Ellipse), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4kivy_8graphics_19vertex_instructions_Rectangle, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Ellipse, /*tp_as_number*/
  &__pyx_tp_as_sequence_Ellipse, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Ellipse, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Ellipse, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("Ellipse(*args, **kwargs)\nA 2d ellipse.\n\n    :Parameters:\n        `segments`: int, default to 180\n            Define how much segment is needed for drawing the ellipse.\n            The drawing will be smoother if you have lot of segment.\n    "), /*tp_doc*/
  __pyx_tp_traverse_4kivy_8graphics_19vertex_instructions_Rectangle, /*tp_traverse*/
  __pyx_tp_clear_4kivy_8graphics_19vertex_instructions_Rectangle, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4kivy_8graphics_19vertex_instructions_Ellipse, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4kivy_8graphics_19vertex_instructions_Ellipse, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_4kivy_8graphics_19vertex_instructions_7Ellipse_0__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4kivy_8graphics_19vertex_instructions_Ellipse, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("vertex_instructions"),
    __Pyx_DOCSTR(__pyx_k_20), /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 1},
  {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
  {&__pyx_n_s__BorderImage, __pyx_k__BorderImage, sizeof(__pyx_k__BorderImage), 0, 0, 1, 1},
  {&__pyx_n_s__Ellipse, __pyx_k__Ellipse, sizeof(__pyx_k__Ellipse), 0, 0, 1, 1},
  {&__pyx_n_s__Line, __pyx_k__Line, sizeof(__pyx_k__Line), 0, 0, 1, 1},
  {&__pyx_n_s__Logger, __pyx_k__Logger, sizeof(__pyx_k__Logger), 0, 0, 1, 1},
  {&__pyx_n_s__MemoryError, __pyx_k__MemoryError, sizeof(__pyx_k__MemoryError), 0, 0, 1, 1},
  {&__pyx_n_s__Point, __pyx_k__Point, sizeof(__pyx_k__Point), 0, 0, 1, 1},
  {&__pyx_n_s__Quad, __pyx_k__Quad, sizeof(__pyx_k__Quad), 0, 0, 1, 1},
  {&__pyx_n_s__Rectangle, __pyx_k__Rectangle, sizeof(__pyx_k__Rectangle), 0, 0, 1, 1},
  {&__pyx_n_s__Triangle, __pyx_k__Triangle, sizeof(__pyx_k__Triangle), 0, 0, 1, 1},
  {&__pyx_n_s____all__, __pyx_k____all__, sizeof(__pyx_k____all__), 0, 0, 1, 1},
  {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1},
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s___border, __pyx_k___border, sizeof(__pyx_k___border), 0, 0, 1, 1},
  {&__pyx_n_s___points, __pyx_k___points, sizeof(__pyx_k___points), 0, 0, 1, 1},
  {&__pyx_n_s___pointsize, __pyx_k___pointsize, sizeof(__pyx_k___pointsize), 0, 0, 1, 1},
  {&__pyx_n_s___segments, __pyx_k___segments, sizeof(__pyx_k___segments), 0, 0, 1, 1},
  {&__pyx_n_s___tex_coords, __pyx_k___tex_coords, sizeof(__pyx_k___tex_coords), 0, 0, 1, 1},
  {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1},
  {&__pyx_n_s__append_data, __pyx_k__append_data, sizeof(__pyx_k__append_data), 0, 0, 1, 1},
  {&__pyx_n_s__batch, __pyx_k__batch, sizeof(__pyx_k__batch), 0, 0, 1, 1},
  {&__pyx_n_s__border, __pyx_k__border, sizeof(__pyx_k__border), 0, 0, 1, 1},
  {&__pyx_n_s__flag_update, __pyx_k__flag_update, sizeof(__pyx_k__flag_update), 0, 0, 1, 1},
  {&__pyx_n_s__h, __pyx_k__h, sizeof(__pyx_k__h), 0, 0, 1, 1},
  {&__pyx_n_s__indices, __pyx_k__indices, sizeof(__pyx_k__indices), 0, 0, 1, 1},
  {&__pyx_n_s__line_strip, __pyx_k__line_strip, sizeof(__pyx_k__line_strip), 0, 0, 1, 1},
  {&__pyx_n_s__points, __pyx_k__points, sizeof(__pyx_k__points), 0, 0, 1, 1},
  {&__pyx_n_s__pointsize, __pyx_k__pointsize, sizeof(__pyx_k__pointsize), 0, 0, 1, 1},
  {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1},
  {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
  {&__pyx_n_s__s0, __pyx_k__s0, sizeof(__pyx_k__s0), 0, 0, 1, 1},
  {&__pyx_n_s__segments, __pyx_k__segments, sizeof(__pyx_k__segments), 0, 0, 1, 1},
  {&__pyx_n_s__set_data, __pyx_k__set_data, sizeof(__pyx_k__set_data), 0, 0, 1, 1},
  {&__pyx_n_s__set_mode, __pyx_k__set_mode, sizeof(__pyx_k__set_mode), 0, 0, 1, 1},
  {&__pyx_n_s__size, __pyx_k__size, sizeof(__pyx_k__size), 0, 0, 1, 1},
  {&__pyx_n_s__t0, __pyx_k__t0, sizeof(__pyx_k__t0), 0, 0, 1, 1},
  {&__pyx_n_s__tex_coords, __pyx_k__tex_coords, sizeof(__pyx_k__tex_coords), 0, 0, 1, 1},
  {&__pyx_n_s__texture, __pyx_k__texture, sizeof(__pyx_k__texture), 0, 0, 1, 1},
  {&__pyx_n_s__trace, __pyx_k__trace, sizeof(__pyx_k__trace), 0, 0, 1, 1},
  {&__pyx_n_s__vertices, __pyx_k__vertices, sizeof(__pyx_k__vertices), 0, 0, 1, 1},
  {&__pyx_n_s__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1},
  {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1},
  {&__pyx_n_s__xrange, __pyx_k__xrange, sizeof(__pyx_k__xrange), 0, 0, 1, 1},
  {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_MemoryError = __Pyx_GetName(__pyx_b, __pyx_n_s__MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION >= 3
  __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #else
  __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants");

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":47
 *         vertices = <vertex_t *>malloc(count * sizeof(vertex_t))
 *         if vertices == NULL:
 *             raise MemoryError('vertices')             # <<<<<<<<<<<<<<
 * 
 *         indices = <int *>malloc(count * sizeof(int))
 */
  __pyx_k_tuple_1 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_1));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__vertices));
  PyTuple_SET_ITEM(__pyx_k_tuple_1, 0, ((PyObject *)__pyx_n_s__vertices));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vertices));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_1));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":52
 *         if indices == NULL:
 *             free(vertices)
 *             raise MemoryError('indices')             # <<<<<<<<<<<<<<
 * 
 *         for i in xrange(count):
 */
  __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_2));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indices));
  PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, ((PyObject *)__pyx_n_s__indices));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indices));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":107
 *         vertices = <vertex_t *>malloc(count * 4 * sizeof(vertex_t))
 *         if vertices == NULL:
 *             raise MemoryError('vertices')             # <<<<<<<<<<<<<<
 * 
 *         indices = <int *>malloc(count * 6 * sizeof(int))
 */
  __pyx_k_tuple_3 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_3));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__vertices));
  PyTuple_SET_ITEM(__pyx_k_tuple_3, 0, ((PyObject *)__pyx_n_s__vertices));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vertices));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_3));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":112
 *         if indices == NULL:
 *             free(vertices)
 *             raise MemoryError('indices')             # <<<<<<<<<<<<<<
 * 
 *         t0, t1, t2, t3, t4, t5, t6, t7 = tc
 */
  __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_4));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indices));
  PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_n_s__indices));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indices));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":332
 *     def __init__(self, **kwargs):
 *         VertexInstruction.__init__(self, **kwargs)
 *         self.pos  = kwargs.get('pos',  (0,0))             # <<<<<<<<<<<<<<
 *         self.size = kwargs.get('size', (100,100))
 * 
 */
  __pyx_k_tuple_5 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_5));
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_5, 1, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":333
 *         VertexInstruction.__init__(self, **kwargs)
 *         self.pos  = kwargs.get('pos',  (0,0))
 *         self.size = kwargs.get('size', (100,100))             # <<<<<<<<<<<<<<
 * 
 *     cdef void build(self):
 */
  __pyx_k_tuple_6 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_6));
  __Pyx_INCREF(__pyx_int_100);
  PyTuple_SET_ITEM(__pyx_k_tuple_6, 0, __pyx_int_100);
  __Pyx_GIVEREF(__pyx_int_100);
  __Pyx_INCREF(__pyx_int_100);
  PyTuple_SET_ITEM(__pyx_k_tuple_6, 1, __pyx_int_100);
  __Pyx_GIVEREF(__pyx_int_100);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":406
 *     def __init__(self, **kwargs):
 *         Rectangle.__init__(self, **kwargs)
 *         self.border = kwargs.get('border', (10,10,10,10))             # <<<<<<<<<<<<<<
 * 
 *     cdef void build(self):
 */
  __pyx_k_tuple_7 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_7));
  __Pyx_INCREF(__pyx_int_10);
  PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, __pyx_int_10);
  __Pyx_GIVEREF(__pyx_int_10);
  __Pyx_INCREF(__pyx_int_10);
  PyTuple_SET_ITEM(__pyx_k_tuple_7, 1, __pyx_int_10);
  __Pyx_GIVEREF(__pyx_int_10);
  __Pyx_INCREF(__pyx_int_10);
  PyTuple_SET_ITEM(__pyx_k_tuple_7, 2, __pyx_int_10);
  __Pyx_GIVEREF(__pyx_int_10);
  __Pyx_INCREF(__pyx_int_10);
  PyTuple_SET_ITEM(__pyx_k_tuple_7, 3, __pyx_int_10);
  __Pyx_GIVEREF(__pyx_int_10);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":410
 *     cdef void build(self):
 *         if not self.texture:
 *             Logger.trace('GBorderImage: texture missing')             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_k_tuple_9 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_9));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
  PyTuple_SET_ITEM(__pyx_k_tuple_9, 0, ((PyObject *)__pyx_kp_s_8));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_9));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":544
 *         vertices = <vertex_t *>malloc((count + 1) * sizeof(vertex_t))
 *         if vertices == NULL:
 *             raise MemoryError('vertices')             # <<<<<<<<<<<<<<
 * 
 *         indices = <int *>malloc(3 * count * sizeof(int))
 */
  __pyx_k_tuple_10 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_10));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__vertices));
  PyTuple_SET_ITEM(__pyx_k_tuple_10, 0, ((PyObject *)__pyx_n_s__vertices));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vertices));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":549
 *         if indices == NULL:
 *             free(vertices)
 *             raise MemoryError('indices')             # <<<<<<<<<<<<<<
 * 
 *         for i in xrange(count):
 */
  __pyx_k_tuple_11 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_11));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indices));
  PyTuple_SET_ITEM(__pyx_k_tuple_11, 0, ((PyObject *)__pyx_n_s__indices));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indices));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":10
 * '''
 * 
 * __all__ = ('Triangle', 'Quad', 'Rectangle', 'BorderImage', 'Ellipse', 'Line',             # <<<<<<<<<<<<<<
 *            'Point')
 * 
 */
  __pyx_k_tuple_21 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_21));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Triangle));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, ((PyObject *)__pyx_n_s__Triangle));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Triangle));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Quad));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 1, ((PyObject *)__pyx_n_s__Quad));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Quad));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Rectangle));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 2, ((PyObject *)__pyx_n_s__Rectangle));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Rectangle));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__BorderImage));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 3, ((PyObject *)__pyx_n_s__BorderImage));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__BorderImage));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Ellipse));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 4, ((PyObject *)__pyx_n_s__Ellipse));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Ellipse));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Line));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 5, ((PyObject *)__pyx_n_s__Line));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Line));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Point));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 6, ((PyObject *)__pyx_n_s__Point));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Point));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_180 = PyInt_FromLong(180); if (unlikely(!__pyx_int_180)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initvertex_instructions(void); /*proto*/
PyMODINIT_FUNC initvertex_instructions(void)
#else
PyMODINIT_FUNC PyInit_vertex_instructions(void); /*proto*/
PyMODINIT_FUNC PyInit_vertex_instructions(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  #if CYTHON_REFNANNY
  void* __pyx_refnanny = NULL;
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_vertex_instructions(void)", __LINE__, __FILE__);
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __pyx_binding_PyCFunctionType_USED
  if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("vertex_instructions"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_20), 0, PYTHON_API_VERSION);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  #if PY_MAJOR_VERSION < 3
  Py_INCREF(__pyx_m);
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_module_is_main_kivy__graphics__vertex_instructions) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction = __Pyx_ImportType("kivy.graphics.instructions", "VertexInstruction", sizeof(struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction->tp_dict, &__pyx_vtabptr_4kivy_8graphics_12instructions_VertexInstruction) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Line = &__pyx_vtable_4kivy_8graphics_19vertex_instructions_Line;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_Line.__pyx_base = *__pyx_vtabptr_4kivy_8graphics_12instructions_VertexInstruction;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_Line.__pyx_base.build = (void (*)(struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction *))__pyx_f_4kivy_8graphics_19vertex_instructions_4Line_build;
  __pyx_type_4kivy_8graphics_19vertex_instructions_Line.tp_base = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction;
  if (PyType_Ready(&__pyx_type_4kivy_8graphics_19vertex_instructions_Line) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_4kivy_8graphics_19vertex_instructions_Line.tp_dict, __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Line) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Line", (PyObject *)&__pyx_type_4kivy_8graphics_19vertex_instructions_Line) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_19vertex_instructions_Line = &__pyx_type_4kivy_8graphics_19vertex_instructions_Line;
  __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Point = &__pyx_vtable_4kivy_8graphics_19vertex_instructions_Point;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_Point.__pyx_base = *__pyx_vtabptr_4kivy_8graphics_12instructions_VertexInstruction;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_Point.__pyx_base.build = (void (*)(struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction *))__pyx_f_4kivy_8graphics_19vertex_instructions_5Point_build;
  __pyx_type_4kivy_8graphics_19vertex_instructions_Point.tp_base = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction;
  if (PyType_Ready(&__pyx_type_4kivy_8graphics_19vertex_instructions_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_4kivy_8graphics_19vertex_instructions_Point.tp_dict, __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Point", (PyObject *)&__pyx_type_4kivy_8graphics_19vertex_instructions_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_19vertex_instructions_Point = &__pyx_type_4kivy_8graphics_19vertex_instructions_Point;
  __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Triangle = &__pyx_vtable_4kivy_8graphics_19vertex_instructions_Triangle;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_Triangle.__pyx_base = *__pyx_vtabptr_4kivy_8graphics_12instructions_VertexInstruction;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_Triangle.__pyx_base.build = (void (*)(struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction *))__pyx_f_4kivy_8graphics_19vertex_instructions_8Triangle_build;
  __pyx_type_4kivy_8graphics_19vertex_instructions_Triangle.tp_base = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction;
  if (PyType_Ready(&__pyx_type_4kivy_8graphics_19vertex_instructions_Triangle) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_4kivy_8graphics_19vertex_instructions_Triangle.tp_dict, __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Triangle) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Triangle", (PyObject *)&__pyx_type_4kivy_8graphics_19vertex_instructions_Triangle) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_19vertex_instructions_Triangle = &__pyx_type_4kivy_8graphics_19vertex_instructions_Triangle;
  __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Quad = &__pyx_vtable_4kivy_8graphics_19vertex_instructions_Quad;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_Quad.__pyx_base = *__pyx_vtabptr_4kivy_8graphics_12instructions_VertexInstruction;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_Quad.__pyx_base.build = (void (*)(struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction *))__pyx_f_4kivy_8graphics_19vertex_instructions_4Quad_build;
  __pyx_type_4kivy_8graphics_19vertex_instructions_Quad.tp_base = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction;
  if (PyType_Ready(&__pyx_type_4kivy_8graphics_19vertex_instructions_Quad) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_4kivy_8graphics_19vertex_instructions_Quad.tp_dict, __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Quad) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Quad", (PyObject *)&__pyx_type_4kivy_8graphics_19vertex_instructions_Quad) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_19vertex_instructions_Quad = &__pyx_type_4kivy_8graphics_19vertex_instructions_Quad;
  __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Rectangle = &__pyx_vtable_4kivy_8graphics_19vertex_instructions_Rectangle;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_Rectangle.__pyx_base = *__pyx_vtabptr_4kivy_8graphics_12instructions_VertexInstruction;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_Rectangle.__pyx_base.build = (void (*)(struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction *))__pyx_f_4kivy_8graphics_19vertex_instructions_9Rectangle_build;
  __pyx_type_4kivy_8graphics_19vertex_instructions_Rectangle.tp_base = __pyx_ptype_4kivy_8graphics_12instructions_VertexInstruction;
  if (PyType_Ready(&__pyx_type_4kivy_8graphics_19vertex_instructions_Rectangle) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_4kivy_8graphics_19vertex_instructions_Rectangle.tp_dict, __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Rectangle) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Rectangle", (PyObject *)&__pyx_type_4kivy_8graphics_19vertex_instructions_Rectangle) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_19vertex_instructions_Rectangle = &__pyx_type_4kivy_8graphics_19vertex_instructions_Rectangle;
  __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_BorderImage = &__pyx_vtable_4kivy_8graphics_19vertex_instructions_BorderImage;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_BorderImage.__pyx_base = *__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Rectangle;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_BorderImage.__pyx_base.__pyx_base.build = (void (*)(struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction *))__pyx_f_4kivy_8graphics_19vertex_instructions_11BorderImage_build;
  __pyx_type_4kivy_8graphics_19vertex_instructions_BorderImage.tp_base = __pyx_ptype_4kivy_8graphics_19vertex_instructions_Rectangle;
  if (PyType_Ready(&__pyx_type_4kivy_8graphics_19vertex_instructions_BorderImage) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_4kivy_8graphics_19vertex_instructions_BorderImage.tp_dict, __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_BorderImage) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "BorderImage", (PyObject *)&__pyx_type_4kivy_8graphics_19vertex_instructions_BorderImage) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_19vertex_instructions_BorderImage = &__pyx_type_4kivy_8graphics_19vertex_instructions_BorderImage;
  __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Ellipse = &__pyx_vtable_4kivy_8graphics_19vertex_instructions_Ellipse;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_Ellipse.__pyx_base = *__pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Rectangle;
  __pyx_vtable_4kivy_8graphics_19vertex_instructions_Ellipse.__pyx_base.__pyx_base.build = (void (*)(struct __pyx_obj_4kivy_8graphics_12instructions_VertexInstruction *))__pyx_f_4kivy_8graphics_19vertex_instructions_7Ellipse_build;
  __pyx_type_4kivy_8graphics_19vertex_instructions_Ellipse.tp_base = __pyx_ptype_4kivy_8graphics_19vertex_instructions_Rectangle;
  if (PyType_Ready(&__pyx_type_4kivy_8graphics_19vertex_instructions_Ellipse) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_4kivy_8graphics_19vertex_instructions_Ellipse.tp_dict, __pyx_vtabptr_4kivy_8graphics_19vertex_instructions_Ellipse) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Ellipse", (PyObject *)&__pyx_type_4kivy_8graphics_19vertex_instructions_Ellipse) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_19vertex_instructions_Ellipse = &__pyx_type_4kivy_8graphics_19vertex_instructions_Ellipse;
  /*--- Type import code ---*/
  __pyx_ptype_4kivy_8graphics_6buffer_Buffer = __Pyx_ImportType("kivy.graphics.buffer", "Buffer", sizeof(struct __pyx_obj_4kivy_8graphics_6buffer_Buffer), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_6buffer_Buffer)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_6buffer_Buffer->tp_dict, &__pyx_vtabptr_4kivy_8graphics_6buffer_Buffer) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_3vbo_VBO = __Pyx_ImportType("kivy.graphics.vbo", "VBO", sizeof(struct __pyx_obj_4kivy_8graphics_3vbo_VBO), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_3vbo_VBO)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_3vbo_VBO->tp_dict, &__pyx_vtabptr_4kivy_8graphics_3vbo_VBO) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_3vbo_VertexBatch = __Pyx_ImportType("kivy.graphics.vbo", "VertexBatch", sizeof(struct __pyx_obj_4kivy_8graphics_3vbo_VertexBatch), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_3vbo_VertexBatch)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_3vbo_VertexBatch->tp_dict, &__pyx_vtabptr_4kivy_8graphics_3vbo_VertexBatch) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_14transformation_Matrix = __Pyx_ImportType("kivy.graphics.transformation", "Matrix", sizeof(struct __pyx_obj_4kivy_8graphics_14transformation_Matrix), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_14transformation_Matrix)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_14transformation_Matrix->tp_dict, &__pyx_vtabptr_4kivy_8graphics_14transformation_Matrix) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_7texture_Texture = __Pyx_ImportType("kivy.graphics.texture", "Texture", sizeof(struct __pyx_obj_4kivy_8graphics_7texture_Texture), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_7texture_Texture)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_7texture_Texture->tp_dict, &__pyx_vtabptr_4kivy_8graphics_7texture_Texture) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_20context_instructions_LineWidth = __Pyx_ImportType("kivy.graphics.context_instructions", "LineWidth", sizeof(struct __pyx_obj_4kivy_8graphics_20context_instructions_LineWidth), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_20context_instructions_LineWidth)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_20context_instructions_LineWidth->tp_dict, &__pyx_vtabptr_4kivy_8graphics_20context_instructions_LineWidth) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_20context_instructions_Color = __Pyx_ImportType("kivy.graphics.context_instructions", "Color", sizeof(struct __pyx_obj_4kivy_8graphics_20context_instructions_Color), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_20context_instructions_Color)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_20context_instructions_Color->tp_dict, &__pyx_vtabptr_4kivy_8graphics_20context_instructions_Color) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_20context_instructions_BindTexture = __Pyx_ImportType("kivy.graphics.context_instructions", "BindTexture", sizeof(struct __pyx_obj_4kivy_8graphics_20context_instructions_BindTexture), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_20context_instructions_BindTexture)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_20context_instructions_BindTexture->tp_dict, &__pyx_vtabptr_4kivy_8graphics_20context_instructions_BindTexture) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_20context_instructions_PushMatrix = __Pyx_ImportType("kivy.graphics.context_instructions", "PushMatrix", sizeof(struct __pyx_obj_4kivy_8graphics_20context_instructions_PushMatrix), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_20context_instructions_PushMatrix)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_20context_instructions_PushMatrix->tp_dict, &__pyx_vtabptr_4kivy_8graphics_20context_instructions_PushMatrix) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_20context_instructions_PopMatrix = __Pyx_ImportType("kivy.graphics.context_instructions", "PopMatrix", sizeof(struct __pyx_obj_4kivy_8graphics_20context_instructions_PopMatrix), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_20context_instructions_PopMatrix)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_20context_instructions_PopMatrix->tp_dict, &__pyx_vtabptr_4kivy_8graphics_20context_instructions_PopMatrix) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_20context_instructions_MatrixInstruction = __Pyx_ImportType("kivy.graphics.context_instructions", "MatrixInstruction", sizeof(struct __pyx_obj_4kivy_8graphics_20context_instructions_MatrixInstruction), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_20context_instructions_MatrixInstruction)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_20context_instructions_MatrixInstruction->tp_dict, &__pyx_vtabptr_4kivy_8graphics_20context_instructions_MatrixInstruction) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_20context_instructions_Transform = __Pyx_ImportType("kivy.graphics.context_instructions", "Transform", sizeof(struct __pyx_obj_4kivy_8graphics_20context_instructions_Transform), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_20context_instructions_Transform)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_20context_instructions_Transform->tp_dict, &__pyx_vtabptr_4kivy_8graphics_20context_instructions_Transform) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_20context_instructions_Rotate = __Pyx_ImportType("kivy.graphics.context_instructions", "Rotate", sizeof(struct __pyx_obj_4kivy_8graphics_20context_instructions_Rotate), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_20context_instructions_Rotate)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_20context_instructions_Rotate->tp_dict, &__pyx_vtabptr_4kivy_8graphics_20context_instructions_Rotate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_20context_instructions_Scale = __Pyx_ImportType("kivy.graphics.context_instructions", "Scale", sizeof(struct __pyx_obj_4kivy_8graphics_20context_instructions_Scale), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_20context_instructions_Scale)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_20context_instructions_Scale->tp_dict, &__pyx_vtabptr_4kivy_8graphics_20context_instructions_Scale) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_20context_instructions_Translate = __Pyx_ImportType("kivy.graphics.context_instructions", "Translate", sizeof(struct __pyx_obj_4kivy_8graphics_20context_instructions_Translate), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_20context_instructions_Translate)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_20context_instructions_Translate->tp_dict, &__pyx_vtabptr_4kivy_8graphics_20context_instructions_Translate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_8compiler_GraphicsCompiler = __Pyx_ImportType("kivy.graphics.compiler", "GraphicsCompiler", sizeof(struct __pyx_obj_4kivy_8graphics_8compiler_GraphicsCompiler), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_8compiler_GraphicsCompiler)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_8compiler_GraphicsCompiler->tp_dict, &__pyx_vtabptr_4kivy_8graphics_8compiler_GraphicsCompiler) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_6shader_Shader = __Pyx_ImportType("kivy.graphics.shader", "Shader", sizeof(struct __pyx_obj_4kivy_8graphics_6shader_Shader), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_6shader_Shader)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_6shader_Shader->tp_dict, &__pyx_vtabptr_4kivy_8graphics_6shader_Shader) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_12instructions_Instruction = __Pyx_ImportType("kivy.graphics.instructions", "Instruction", sizeof(struct __pyx_obj_4kivy_8graphics_12instructions_Instruction), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_12instructions_Instruction)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_12instructions_Instruction->tp_dict, &__pyx_vtabptr_4kivy_8graphics_12instructions_Instruction) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_12instructions_InstructionGroup = __Pyx_ImportType("kivy.graphics.instructions", "InstructionGroup", sizeof(struct __pyx_obj_4kivy_8graphics_12instructions_InstructionGroup), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_12instructions_InstructionGroup)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_12instructions_InstructionGroup->tp_dict, &__pyx_vtabptr_4kivy_8graphics_12instructions_InstructionGroup) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_12instructions_ContextInstruction = __Pyx_ImportType("kivy.graphics.instructions", "ContextInstruction", sizeof(struct __pyx_obj_4kivy_8graphics_12instructions_ContextInstruction), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_12instructions_ContextInstruction)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_12instructions_ContextInstruction->tp_dict, &__pyx_vtabptr_4kivy_8graphics_12instructions_ContextInstruction) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_12instructions_CanvasBase = __Pyx_ImportType("kivy.graphics.instructions", "CanvasBase", sizeof(struct __pyx_obj_4kivy_8graphics_12instructions_CanvasBase), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_12instructions_CanvasBase)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_12instructions_CanvasBase->tp_dict, &__pyx_vtabptr_4kivy_8graphics_12instructions_CanvasBase) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_12instructions_Canvas = __Pyx_ImportType("kivy.graphics.instructions", "Canvas", sizeof(struct __pyx_obj_4kivy_8graphics_12instructions_Canvas), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_12instructions_Canvas)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_12instructions_Canvas->tp_dict, &__pyx_vtabptr_4kivy_8graphics_12instructions_Canvas) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_4kivy_8graphics_12instructions_RenderContext = __Pyx_ImportType("kivy.graphics.instructions", "RenderContext", sizeof(struct __pyx_obj_4kivy_8graphics_12instructions_RenderContext), 1); if (unlikely(!__pyx_ptype_4kivy_8graphics_12instructions_RenderContext)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_GetVtable(__pyx_ptype_4kivy_8graphics_12instructions_RenderContext->tp_dict, &__pyx_vtabptr_4kivy_8graphics_12instructions_RenderContext) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Function import code ---*/
  __pyx_t_1 = __Pyx_ImportModule("kivy.graphics.vbo"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportFunction(__pyx_t_1, "vbo_vertex_attr_count", (void (**)(void))&__pyx_f_4kivy_8graphics_3vbo_vbo_vertex_attr_count, "int (void)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportFunction(__pyx_t_1, "vbo_vertex_attr_list", (void (**)(void))&__pyx_f_4kivy_8graphics_3vbo_vbo_vertex_attr_list, "__pyx_t_4kivy_8graphics_6vertex_vertex_attr_t *(void)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_ImportModule("kivy.graphics.instructions"); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportFunction(__pyx_t_2, "getActiveCanvas", (void (**)(void))&__pyx_f_4kivy_8graphics_12instructions_getActiveCanvas, "struct __pyx_obj_4kivy_8graphics_12instructions_CanvasBase *(void)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  /*--- Execution code ---*/

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":10
 * '''
 * 
 * __all__ = ('Triangle', 'Quad', 'Rectangle', 'BorderImage', 'Ellipse', 'Line',             # <<<<<<<<<<<<<<
 *            'Point')
 * 
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_k_tuple_21)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/tito/code/kivy/kivy/graphics/common.pxi":5
 * #
 * 
 * cdef double pi = 3.1415926535897931             # <<<<<<<<<<<<<<
 * cdef extern from "math.h":
 *     double cos(double) nogil
 */
  __pyx_v_4kivy_8graphics_19vertex_instructions_pi = 3.1415926535897931;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":23
 * IF USE_OPENGL_DEBUG == 1:
 *     from c_opengl_debug cimport *
 * from kivy.logger import Logger             # <<<<<<<<<<<<<<
 * 
 * cdef class Line(VertexInstruction):
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Logger));
  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__Logger));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Logger));
  __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s_22), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__Logger); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Logger, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/vertex_instructions.pyx":1
 * #cython: embedsignature=True             # <<<<<<<<<<<<<<
 * 
 * '''
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "/home/tito/code/kivy/kivy/graphics/shader.pxd":2
 * 
 * from c_opengl cimport GLuint             # <<<<<<<<<<<<<<
 * from transformation cimport Matrix
 * 
 */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  if (__pyx_m) {
    __Pyx_AddTraceback("init kivy.graphics.vertex_instructions");
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init kivy.graphics.vertex_instructions");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result)
        PyErr_SetObject(PyExc_NameError, name);
    return result;
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *number, *more_or_less;

    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    number = (num_expected == 1) ? "" : "s";
    PyErr_Format(PyExc_TypeError,
        #if PY_VERSION_HEX < 0x02050000
            "%s() takes %s %d positional argument%s (%d given)",
        #else
            "%s() takes %s %zd positional argument%s (%zd given)",
        #endif
        func_name, more_or_less, num_expected, number, num_found);
}

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #else
        if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key)))
        #endif
            goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t q = a / b;
    Py_ssize_t r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}


static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
        #if PY_VERSION_HEX < 0x02050000
                 "need more than %d value%s to unpack", (int)index,
        #else
                 "need more than %zd value%s to unpack", index,
        #endif
                 (index == 1) ? "" : "s");
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
        #if PY_VERSION_HEX < 0x02050000
            "too many values to unpack (expected %d)", (int)expected);
        #else
            "too many values to unpack (expected %zd)", expected);
        #endif
}

static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
    PyObject *item;
    if (!(item = PyIter_Next(iter))) {
        if (!PyErr_Occurred()) {
            __Pyx_RaiseNeedMoreValuesError(index);
        }
    }
    return item;
}

static int __Pyx_EndUnpack(PyObject *iter, Py_ssize_t expected) {
    PyObject *item;
    if ((item = PyIter_Next(iter))) {
        Py_DECREF(item);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    else if (!PyErr_Occurred())
        return 0;
    else
        return -1;
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AS_STRING(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;

    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
        } else {
            #if PY_MAJOR_VERSION < 3
            if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
            #else
            if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
            #endif
                goto invalid_keyword_type;
            } else {
                for (name = first_kw_arg; *name; name++) {
                    #if PY_MAJOR_VERSION >= 3
                    if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                        PyUnicode_Compare(**name, key) == 0) break;
                    #else
                    if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                        _PyString_Eq(**name, key)) break;
                    #endif
                }
                if (*name) {
                    values[name-argnames] = value;
                } else {
                    /* unexpected keyword found */
                    for (name=argnames; name != first_kw_arg; name++) {
                        if (**name == key) goto arg_passed_twice;
                        #if PY_MAJOR_VERSION >= 3
                        if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                            PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
                        #else
                        if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                            _PyString_Eq(**name, key)) goto arg_passed_twice;
                        #endif
                    }
                    if (kwds2) {
                        if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                    } else {
                        goto invalid_keyword;
                    }
                }
            }
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, **name);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static CYTHON_INLINE long __Pyx_mod_long(long a, long b) {
    long r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
    PyObject *py_import = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
    if (!py_import)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(py_import);
    Py_XDECREF(empty_dict);
    return module;
}

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();

    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}

static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;

    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}


#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    /* First, check the traceback argument, replacing None with NULL. */
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    /* Next, replace a missing value with None */
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    #if PY_VERSION_HEX < 0x02050000
    if (!PyClass_Check(type))
    #else
    if (!PyType_Check(type))
    #endif
    {
        /* Raising an instance.  The value should be a dummy. */
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        /* Normalize to raise <class>, <instance> */
        Py_DECREF(value);
        value = type;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                type = 0;
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            type = (PyObject*) Py_TYPE(type);
            Py_INCREF(type);
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception class must be a subclass of BaseException");
                goto raise_error;
            }
        #endif
    }

    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}

#else /* Python 3+ */

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;

    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (!PyExceptionClass_Check(type)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }

    PyErr_SetObject(type, value);

    if (tb) {
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
    }

bad:
    return;
}
#endif

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return PyLong_AsUnsignedLong(x);
        } else {
            return PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return PyLong_AsUnsignedLongLong(x);
        } else {
            return PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return PyLong_AsUnsignedLong(x);
        } else {
            return PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return PyLong_AsUnsignedLongLong(x);
        } else {
            return PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return PyLong_AsUnsignedLong(x);
        } else {
            return PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return PyLong_AsUnsignedLongLong(x);
        } else {
            return PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static void __Pyx_WriteUnraisable(const char *name) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
}

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    long size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];

    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    #if PY_MAJOR_VERSION < 3
    py_name = PyString_FromString(class_name);
    #else
    py_name = PyUnicode_FromString(class_name);
    #endif
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%s.%s is not a type object",
            module_name, class_name);
        goto bad;
    }
    if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility",
            module_name, class_name);
        #if PY_VERSION_HEX < 0x02050000
        PyErr_Warn(NULL, warning);
        #else
        PyErr_WarnEx(NULL, warning, 0);
        #endif
    }
    else if (((PyTypeObject *)result)->tp_basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%s.%s has the wrong size, try recompiling",
            module_name, class_name);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return 0;
}
#endif

#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;

    #if PY_MAJOR_VERSION < 3
    py_name = PyString_FromString(name);
    #else
    py_name = PyUnicode_FromString(name);
    #endif
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

static int __Pyx_GetVtable(PyObject *dict, void *vtabptr) {
    PyObject *ob = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__");
    if (!ob)
        goto bad;
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    *(void **)vtabptr = PyCapsule_GetPointer(ob, 0);
#else
    *(void **)vtabptr = PyCObject_AsVoidPtr(ob);
#endif
    if (!*(void **)vtabptr)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

#ifndef __PYX_HAVE_RT_ImportFunction
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;

    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, funcname);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%s does not export expected C function %s",
                PyModule_GetName(module), funcname);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C function %s.%s has wrong signature (expected %s, got %s)",
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    tmp.p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C function %s.%s has wrong signature (expected %s, got %s)",
             PyModule_GetName(module), funcname, sig, desc);
        goto bad;
    }
    tmp.p = PyCObject_AsVoidPtr(cobj);}
#endif
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"

static void __Pyx_AddTraceback(const char *funcname) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;

    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(__pyx_filename);
    #else
    py_srcfile = PyUnicode_FromString(__pyx_filename);
    #endif
    if (!py_srcfile) goto bad;
    if (__pyx_clineno) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        #if PY_MAJOR_VERSION >= 3
        0,            /*int kwonlyargcount,*/
        #endif
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple,  /*PyObject *consts,*/
        __pyx_empty_tuple,  /*PyObject *names,*/
        __pyx_empty_tuple,  /*PyObject *varnames,*/
        __pyx_empty_tuple,  /*PyObject *freevars,*/
        __pyx_empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

/* Type Conversion Functions */

static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}

static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_VERSION_HEX < 0x03000000
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_VERSION_HEX < 0x03000000
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%s__ returned non-%s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}

static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}

static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
       return (size_t)-1;
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
