Skip to content

pg.transform.flip takes no arguments #2

@Rakomi

Description

@Rakomi

When I execute main.py I get an error. It seems that in texture.py, pg.transform.flip is suppose to return a texture flipped along x or y but this function apparently takes no keyword arguments.
Here's my console output (removed the path above):

pygame 2.0.1 (SDL 2.0.14, Python 3.9.1)
Hello from the pygame community. https://www.pygame.org/contribute.html
Unimplemented OBJ format statement 'Tf' on line '	Tf 1.0000 1.0000 1.0000'
Traceback (most recent call last):
  File "C:\3D-Graphics-Engine\main.py", line 75, in <module>
    app = GraphicsEngine()
  File "C:\3D-Graphics-Engine\main.py", line 40, in __init__
    self.mesh = Mesh(self)
  File "C:\3D-Graphics-Engine\mesh.py", line 9, in __init__
    self.texture = Texture(app)
  File "C:\3D-Graphics-Engine\texture.py", line 11, in __init__
    self.textures[0] = self.get_texture(path='textures/img.png')
  File "C:\3D-Graphics-Engine\texture.py", line 47, in get_texture
    texture = pg.transform.flip(texture, flip_x=False, flip_y=True)
TypeError: flip() takes no keyword arguments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions