Improved the way rectangle are handled;

Some bug fixes.


git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1093 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
remi-k 2009-05-21 13:52:28 +00:00
parent caf7f915d5
commit 60e14e75b7
14 changed files with 145 additions and 115 deletions

View file

@ -167,13 +167,17 @@ PySfFont_GetCharacterSize(PySfFont* self)
static PyObject *
PySfFont_GetGlyph(PySfFont* self, PyObject *args)
{
PySfGlyph *PyGlyph = GetNewPySfGlyph();
sf::Glyph *Glyph = new sf::Glyph(self->obj->GetGlyph(PyLong_AsUnsignedLong(args)));
PyGlyph->obj = Glyph;
PyGlyph->Rectangle->obj = &(PyGlyph->obj->Rectangle);
PyGlyph->TexCoords->obj = &(PyGlyph->obj->TexCoords);
PySfGlyphUpdateSelf(PyGlyph);
return (PyObject *)PyGlyph;
PySfGlyph *Glyph = GetNewPySfGlyph();
Glyph->Owner = false;
Glyph->Rectangle = GetNewPySfIntRect();
Glyph->Rectangle->Owner = false;
Glyph->TexCoords = GetNewPySfFloatRect();
Glyph->TexCoords->Owner = false;
Glyph->obj = (sf::Glyph *) &(self->obj->GetGlyph(PyLong_AsUnsignedLong(args)));
Glyph->Rectangle->obj = &(Glyph->obj->Rectangle);
Glyph->TexCoords->obj = &(Glyph->obj->TexCoords);
PySfGlyphUpdateSelf(Glyph);
return (PyObject *)Glyph;
}
static PyMethodDef PySfFont_methods[] = {