1. pygame
  2. pygame
  3. pygame
  4. Issues


Issue #49 resolved

Font.render() raises a TypeError if background is None

René Dudfield
created an issue

== John, 2010-05-25 20:25:21 -0700

{{{ The documentation says that Font.render()'s background argument defaults to None, however if None actually used it raises an exception:

TypeError: Invalid background RGBA argument

This became problematic when I wanted to extend the default Font class with my own render function. I can't simply accept a background argument with a default value of None and pass it on to the original renderer, if the background is None then the argument has to be excluded completely. }}}

== Marco Chieppa, 2010-07-01 08:01:17 -0700

{{{ Created attachment 36 proposed patch font render for enable background=None

based on revision 2827 }}}

Attachments: [[http://www.pygame.org/old_bug_attachments/36/pygame_font.c_patch| pygame_font.c_patch]]

== Marco Chieppa, 2010-07-01 16:32:41 -0700

{{{ Created attachment 37 test for attachment 36 }}}

Attachments: [[http://www.pygame.org/old_bug_attachments/37/font_test2.py| font_test2.py]]

Comments (2)

  1. Log in to comment