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:
parent
caf7f915d5
commit
60e14e75b7
14 changed files with 145 additions and 115 deletions
|
@ -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[] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue