Skip to content

Add line thickness in gfxdraw #2463

Open
@mzivic7

Description

@mzivic7

Description

Add line thickness value in gfxdraw.aacircle and other gfxdraw shapes, just like in pygame.draw.

For now i am using this code for aacircle:

def draw_circle(surface, color, pos, radius, thickness):
	if thickness != 1:
		for num in range(1, thickness):
			gfxdraw.aacircle(surface, int(pos[0]), int(pos[1]), int(radius)+num, color) 

But it is not perfect: there can be seen background pixels between two lines, because gfxdraw accepts only int.

Tasks for closing

  • implement pygame.draw.aacircle
  • deprecate pygame.gfxdraw.aacircle

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions