Return a new window named title
with size width
x height
Clear the entire window with the color (r, g, b)
Draw a centered at (x, y)
with radius radius
and color (r, g, b)
Draw a from (x1, y1)
to (x2, y2)
that is width
pixels thick and has color (r, g, b)
Draw a point at (x, y)
that is size
pixels wide and has color (r, g, b)
Draw a rectangle starting at (x, y)
(the top-left corner) that is width
pixels wide and height
pixels tall and has color (r, g, b)
Draw a triangle with corners (x1, y1)
, (x2, y2)
, and (x3, y3)
and color
(r, g, b)
Return the position, in pixels, of the mouse relative to the top-left corner of the window
Return the size of the window in pixels
Set the mouse cursor to be invisible when inside the window
Return whether or not the window is still open; use while window.isOpen():
to loop until the window close button is clicked or the window is otherwise
killed
Set the size of the window to width
x height
Set the mouse cursor to be visible when inside the window (this is the default behavior)
Toggle the maximized state of the window; windows are not maximized by default, so the first call to toggleMaximized will maximize the window
Update the window, causing drawn elements to be visible; call this function once per loop at the end of all drawing-related calls
Typical window loops should look like this:
win = ccircle.Window('SuperWindow!!')
while win.isOpen():
# Do your drawing and other stuff here!
win.update()