PySFML 1.6 and 2.0: Fixed SetSmooth and implemented IsSmooth
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1531 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
ef8a2700fe
commit
1f906c0643
@ -210,6 +210,12 @@ PySfImage_SetSmooth (PySfImage *self, PyObject *args)
|
|||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *
|
||||||
|
PySfImage_IsSmooth (PySfImage *self)
|
||||||
|
{
|
||||||
|
return PyBool_FromLong(self->obj->IsSmooth());
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PySfImage_GetWidth(PySfImage *self)
|
PySfImage_GetWidth(PySfImage *self)
|
||||||
{
|
{
|
||||||
@ -233,7 +239,7 @@ static PyObject *
|
|||||||
PySfImage_GetTexCoords(PySfImage* self, PyObject *args)
|
PySfImage_GetTexCoords(PySfImage* self, PyObject *args)
|
||||||
{
|
{
|
||||||
PySfIntRect *RectArg = NULL;
|
PySfIntRect *RectArg = NULL;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "O!:Image.GetTextCoords", &PySfIntRectType, &RectArg))
|
if (!PyArg_ParseTuple(args, "O!:Image.GetTextCoords", &PySfIntRectType, &RectArg))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@ -295,7 +301,8 @@ Create the image from the current contents of the given window. Return True if c
|
|||||||
{"GetPixels", (PyCFunction)PySfImage_GetPixels, METH_NOARGS, "GetPixels()\nGet a string representing the array of pixels (8 bits integers RGBA). String length is GetWidth() x GetHeight() x 4. This string becomes invalid if you reload or resize the image."},
|
{"GetPixels", (PyCFunction)PySfImage_GetPixels, METH_NOARGS, "GetPixels()\nGet a string representing the array of pixels (8 bits integers RGBA). String length is GetWidth() x GetHeight() x 4. This string becomes invalid if you reload or resize the image."},
|
||||||
{"CreateMaskFromColor", (PyCFunction)PySfImage_CreateMaskFromColor, METH_O, "CreateMaskFromColor(Color)\nCreate transparency mask from a specified colorkey."},
|
{"CreateMaskFromColor", (PyCFunction)PySfImage_CreateMaskFromColor, METH_O, "CreateMaskFromColor(Color)\nCreate transparency mask from a specified colorkey."},
|
||||||
{"Bind", (PyCFunction)PySfImage_Bind, METH_NOARGS, "Bind()\nBind the image for rendering."},
|
{"Bind", (PyCFunction)PySfImage_Bind, METH_NOARGS, "Bind()\nBind the image for rendering."},
|
||||||
{"SetSmooth", (PyCFunction)PySfImage_SetSmooth, METH_VARARGS, "SetSmooth(Smooth)\nEnable or disable image smooth filter."},
|
{"SetSmooth", (PyCFunction)PySfImage_SetSmooth, METH_O, "SetSmooth(Smooth)\nEnable or disable image smooth filter."},
|
||||||
|
{"IsSmooth", (PyCFunction)PySfImage_IsSmooth, METH_NOARGS, "IsOpened(Smooth)\nTells whether the smooth filtering is enabled or not."},
|
||||||
{"GetWidth", (PyCFunction)PySfImage_GetWidth, METH_NOARGS, "GetWidth()\nReturn the width of the image."},
|
{"GetWidth", (PyCFunction)PySfImage_GetWidth, METH_NOARGS, "GetWidth()\nReturn the width of the image."},
|
||||||
{"GetHeight", (PyCFunction)PySfImage_GetHeight, METH_NOARGS, "GetHeight()\nReturn the height of the image."},
|
{"GetHeight", (PyCFunction)PySfImage_GetHeight, METH_NOARGS, "GetHeight()\nReturn the height of the image."},
|
||||||
{"GetTexCoords", (PyCFunction)PySfImage_GetTexCoords, METH_VARARGS, "GetTexCoords(Rect)\nConvert a subrect expressed in pixels, into float texture coordinates. Returns texture coordinates corresponding to the sub-rectangle (sf.FloatRect instance)\n\
|
{"GetTexCoords", (PyCFunction)PySfImage_GetTexCoords, METH_VARARGS, "GetTexCoords(Rect)\nConvert a subrect expressed in pixels, into float texture coordinates. Returns texture coordinates corresponding to the sub-rectangle (sf.FloatRect instance)\n\
|
||||||
@ -379,7 +386,7 @@ PySfImage_Copy(PySfImage* self, PyObject *args, PyObject *kwds)
|
|||||||
unsigned int DestX, DestY;
|
unsigned int DestX, DestY;
|
||||||
PyObject *PyApplyAlpha = NULL;
|
PyObject *PyApplyAlpha = NULL;
|
||||||
bool ApplyAlpha = false;
|
bool ApplyAlpha = false;
|
||||||
|
|
||||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!II|O!O:Image.Copy", (char **)kwlist, &PySfImageType, &Source, &DestX, &DestY, &PySfIntRectType, &SourceRect, &PyApplyAlpha))
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!II|O!O:Image.Copy", (char **)kwlist, &PySfImageType, &Source, &DestX, &DestY, &PySfIntRectType, &SourceRect, &PyApplyAlpha))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user