int GeoLayer::aaellipse(int16_t x, int16_t y, int16_t rx, int16_t ry, uint32_t col) { if(!surf) { error("%s can't run: layer not initialized", __PRETTY_FUNCTION__); return -1; } res = aaellipseColor(surf, x, y, rx, ry, col); if(res < 0) error("error in %s", __PRETTY_FUNCTION__); return(res); }
CAMLprim value ml_aaellipseColor(value dst,value p,value rp, value col) { SDL_Surface *sur= SDL_SURFACE(dst); SDL_Rect prect,rprect; int r; SDLRect_of_value(&prect,p); SDLRect_of_value(&rprect,rp); r=aaellipseColor(sur,prect.x,prect.y,rprect.x,rprect.y,Int32_val(col)); return Val_bool(r); }
static PyObject* _gfx_aaellipsecolor (PyObject *self, PyObject* args) { PyObject *surface, *color, *pt, *rd; int x, y, rx, ry; pguint32 c; ASSERT_VIDEO_INIT (NULL); if (!PyArg_ParseTuple (args, "OOOO:aaellipse", &surface, &pt, &rd, &color)) { PyErr_Clear (); if (!PyArg_ParseTuple (args, "OiiiiO:aaellipse", &surface, &x, &y, &rx, &ry, &color)) return NULL; } else { if (!PointFromObj (pt, &x, &y) || !PointFromObj (rd, &rx, &ry)) return NULL; } if (!PySDLSurface_Check (surface)) { PyErr_SetString (PyExc_TypeError, "surface must be a Surface"); return NULL; } if (!ColorFromObj (color, &c)) return NULL; if (aaellipseColor (((PySDLSurface*)surface)->surface, (Sint16)x, (Sint16)y, (Sint16)rx, (Sint16)ry, (Uint32)c) == -1) { PyErr_SetString (PyExc_PyGameError, SDL_GetError ()); return NULL; } Py_RETURN_NONE; }