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


Issue #147 new

gfxdraw doesn't work with inherited surfaces

Anonymous created an issue

it seems that gfxdraw not works with objects that inherit from Surface

import pygame as pg
from pygame import gfxdraw

class Frame(pg.Surface,object):
    def __init__(self,x,y,w,h):

scr = pg.display.set_mode((500,500))
fr = Frame(50,50,300,300)

Traceback (most recent call last):

File "gfxdrawbug.py", line 13, in <module> pg.gfxdraw.box(fr,pg.Rect(0,0,50,50),pg.Color('red'))

TypeError: surface must be a Surface

Comments (0)

  1. Log in to comment