See pygame.draw.rect()
:
rect(surface, color, rect, width=0) -> Rect
width (int) --
(optional) used for line thickness or to indicate that the rectangle is to be filled (not to be confused with the width value of the rect parameter)
- if width > 0, used for line thickness
Note When using width values > 1, the edge lines will grow outside the original boundary of the rect.
Therefore you are actually drawing 4 lines 5 in length but 100 in thickness along the edges of the rectangle. Since the lines are arranged in a square and are thicker than they are long, the final shape appears to be a cross.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…