Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
x_offset
#1
Hi All,
I am just starting with Python/pygame and am playing around with shapes.
I am trying to get some lines on screen as below (not dotted)
-----------------
---------------
------------
---------
I can get the y_offset to work but not the x_offset what am I missing?
    for y_offset in range(0, 100, 10):
        for x_offset in range(0, 100, 10):
            pygame.draw.line(screen, RED, [x_offset, 160 + y_offset], [x_offset-10, 160 + y_offset], 5)
Thanks for looking
Reply


Messages In This Thread
x_offset - by Graham - Nov-21-2018, 03:00 PM
RE: x_offset - by Mekire - Nov-22-2018, 06:29 AM
RE: x_offset - by Graham - Nov-22-2018, 08:49 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020