+static PyObject* shape_getfillstyle(PyObject*self, PyObject*args)
+{
+ tag_internals_t*itag = tag_getinternals(self);
+ if(!shape_parse(itag))
+ return PY_ERROR("Couldn't parse shape");
+ shape_internal_t*fi = (shape_internal_t*)itag->data;
+ int nr = 0;
+ if(!PyArg_ParseTuple(args, "i", &nr))
+ return NULL;
+
+ int num = fi->shape2->numfillstyles;
+ if(nr < 0 || nr >=num)
+ return PY_ERROR("fillstyle index out of range");
+ return f_FillStyle2(fi->shape2->fillstyles[nr]);
+}
+static PyObject* shape_getlinestyle(PyObject*self, PyObject*args)
+{
+ tag_internals_t*itag = tag_getinternals(self);
+ if(!shape_parse(itag))
+ return PY_ERROR("Couldn't parse shape");
+ shape_internal_t*fi = (shape_internal_t*)itag->data;
+ int nr = 0;
+ if(!PyArg_ParseTuple(args, "i", &nr))
+ return NULL;
+
+ int num = fi->shape2->numfillstyles;
+ if(nr < 0 || nr >=num)
+ return PY_ERROR("fillstyle index out of range");
+ return f_LineStyle3(fi->shape2->linestyles[nr]);
+}
+static PyObject* shape_setfillstyle(PyObject*self, PyObject*args)
+{
+ tag_internals_t*itag = tag_getinternals(self);
+ if(!shape_parse(itag))
+ return PY_ERROR("Couldn't parse shape");
+ shape_internal_t*fi = (shape_internal_t*)itag->data;
+ int nr = 0;
+ PyObject*fs = 0;
+ if(!PyArg_ParseTuple(args, "iO!", &nr, &FillStyleClass, &fs))
+ return NULL;
+
+ int num = fi->shape2->numfillstyles;
+ if(nr < 0 || nr >=num)
+ return PY_ERROR("fillstyle index out of range");
+ fi->shape2->fillstyles[nr] = fillstyle_getFillStyle(fs);
+ return PY_NONE;
+}
+static PyObject* shape_setlinestyle(PyObject*self, PyObject*args)
+{
+ tag_internals_t*itag = tag_getinternals(self);
+ if(!shape_parse(itag))
+ return PY_ERROR("Couldn't parse shape");
+ shape_internal_t*fi = (shape_internal_t*)itag->data;
+ int nr = 0;
+ PyObject*ls = 0;
+ if(!PyArg_ParseTuple(args, "iO!", &nr, &LineStyleClass, &ls))
+ return NULL;
+
+ int num = fi->shape2->numlinestyles;
+ if(nr < 0 || nr >=num)
+ return PY_ERROR("linestyle index out of range");
+ fi->shape2->linestyles[nr] = linestyle_getLineStyle(ls);
+ return PY_NONE;
+}