Skip to content
themixray edited this page Dec 17, 2021 · 7 revisions

Init

Initialization a rect.

pygwin.rect(x,y,w,h)
  • x Rect x
  • y Rect y
  • w Rect width
  • h Rect height

Returns rect

Structure

Structure

Collide

Is collide rect.

rect.collide(x)
  • x Rect.

Returns bool

Contains

Is contains position.

rect.contains(x, y)
  • x x.
  • y y.

Returns bool

Get pos

rect[:2]

Returns list

Get size

rect[2:]

Returns list

Parameters

rect.x == rect.left
rect.y == rect.up

rect.r == rect.right
rect.d == rect.down

rect.w == rect.width
rect.h == rect.height

rect.c == rect.center
rect.c == rect.middle
rect.c == (rect.cx,rect.cy)
Clone this wiki locally