dudraw.py
The dudraw module defines functions that allow the user to create a simple 2-dimensional drawing. A drawing appears on the canvas. The canvas appears in the window. As a convenience, the module also imports the commonly used Color objects defined in the color module.
Function | annulus |
Draw an annulus centered at (x, y) with outer radius r1, and inner radius r2. |
Function | arc |
Draw an arc portion between angle1 and angle2, of the circumference of a circle centered at (x, y) with a radius r. |
Function | circle |
Draw on the background canvas a circle of radius r centered on (x, y). |
Function | clear |
Clear the background canvas to color c, where c is an object of class Color. c defaults to dudraw.WHITE. |
Function | clear |
Clear the background canvas to color defined by r, g, and b. Defaults to white (255, 255, 255). |
Function | ellipse |
Draw on the background canvas an ellipse centered at (x, y) with a width of 2.0 * half_width, and a height of 2.0 * half_height. |
Function | elliptical |
Draw an arc portion between angle1 and angle2, of the circumference of an ellipse centered at (x, y) with a width of half_width, and a height of 2.0 * half_height. |
Function | elliptical |
Draw a sector portion between angle1 and angle2, of the interior of an ellipse centered at (x, y) with a width of half_width, and a height of 2.0 * half_height. |
Function | filled |
Draw a filled annulus centered at (x, y) with outer radius r1, and inner radius r2. |
Function | filled |
Draw on the background canvas a filled circle of radius r centered on (x, y). |
Function | filled |
Draw on the background canvas a filled ellipse centered at (x, y) with a width of 2.0 * half_width, and a height of 2.0 * half_height. |
Function | filled |
Draw a filled sector portion between angle1 and angle2, of the interior of an ellipse centered at (x, y) with a width of half_width, and a height of 2.0 * half_height. |
Function | filled |
Draw on the background canvas a filled polygon with coordinates (x[i], y[i]). |
Function | filled |
Draw a filled quadrilateral on the background canvas with corners at (x0, y0), (x1, y1), (x2, y2), and (x3, y3). |
Function | filled |
Draw on the background canvas a rectangle of width (2 * halfWidth and height (2 * halfHeight) centered at point (x, y). |
Function | filled |
Draw a filled sector portion between angle1 and angle2, of the interior of a circle centered at (x, y) with a radius r. |
Function | filled |
Draw on the background canvas a filled square whose sides are of length 2r, centered on (x, y). |
Function | filled |
Draw a filled triangle on the background canvas with corners at (x0, y0), (x1, y1), and (x2, y2). |
Function | get |
Return the height of the current canvas. |
Function | get |
Return the width of the current canvas. |
Function | get |
Return the pen color as an object of class Color. |
Function | get |
Return the color of the pixel at the given user coordinates. |
Function | has |
Return True if the queue of keys the user typed is not empty. Otherwise return False. |
Function | line |
Draw on the background canvas a line from (x0, y0) to (x1, y1). |
Function | mouse |
Return True if the mouse has been left-clicked since the last time mousePressed was called, and False otherwise. |
Function | mouse |
Return the x coordinate in user space of the location at which the mouse was most recently left-clicked. |
Function | mouse |
Return the y coordinate in user space of the location at which the mouse was most recently left-clicked. |
Function | next |
Remove the first key from the queue of keys that the the user typed, and return that key. |
Function | picture |
Draw pic on the background canvas centered at (x, y). |
Function | point |
Draw on the canvas a point at coordinates (x, y). |
Function | polygon |
Draw on the background canvas a polygon with coordinates (x[i], y[i]). |
Function | polyline |
Draw on the background canvas a polyline with coordinates (x[i], y[i]). |
Function | quadrilateral |
Draw a quadrilateral on the background canvas with corners at (x0, y0), (x1, y1), (x2, y2), and (x3, y3). |
Function | rectangle |
Draw on the background canvas a rectangle of width (2 * halfWidth and height (2 * halfHeight) centered at point (x, y). |
Function | save |
Save the window canvas as a .jpg to filepath specified. |
Function | sector |
Draw a sector portion between angle1 and angle2, of the interior of a circle centered at (x, y) with a radius r. |
Function | set |
Set the size of the canvas to w pixels wide and h pixels high. |
Function | set |
Set the font family to f (e.g. 'Helvetica' or 'Courier'). |
Function | set |
Set the font size to s (e.g. 12, 14, 16..etc). |
Function | set |
Set the pen color to c, where c is an object of class Color. c defaults to dudraw.BLACK. |
Function | set |
Set the pen color using red, green, and blue values. Defaults to black. |
Function | set |
Set the pen width/radius to w |
Function | set |
Set the x-scale and y-scale of the canvas to the same range for both directions. |
Function | set |
Set the x-scale of the canvas such that the minimum y value is min and the maximum y value is max. |
Function | set |
Set the y-scale of the canvas such that the minimum y value is min and the maximum y value is max. |
Function | show |
Copy the background canvas to the window canvas, and then wait for msec milliseconds. msec defaults to 0.0. |
Function | square |
Draw on the background canvas a square whose sides are of length 2r, centered on (x, y). |
Function | text |
Draw a line of string on the background canvas centered at (x, y). |
Function | triangle |
Draw a triangle on the background canvas with corners at (x0, y0), (x1, y1), and (x2, y2). |
Function | _ccw |
Undocumented |
Function | _check |
Check if any new event has occured (such as a key typed or button pressed). If a key has been typed, then put that key in a queue. |
Function | _factor |
Undocumented |
Function | _factor |
Undocumented |
Function | _intersect |
Undocumented |
Function | _line |
Undocumented |
Function | _main |
Dispatch to a function that does regression testing, or to a dialog-box-handling function. |
Function | _make |
Undocumented |
Function | _pen |
Undocumented |
Function | _pixel |
Draw on the background canvas a pixel at (x, y). |
Function | _pygame |
Convert c, an object of type Color, to an equivalent object of type pygame.Color. Return the result. |
Function | _regression |
Perform regression testing. |
Function | _scale |
Undocumented |
Function | _scale |
Undocumented |
Function | _scale |
Undocumented |
Function | _show |
Copy the background canvas to the window canvas. |
Function | _show |
Copy the background canvas to the window canvas. Then wait forever, that is, until the user closes the dudraw window. |
Function | _thick |
Draw on the background canvas a line from (x0, y0) to (x1, y1). Draw the line with a pen whose radius is r. |
Function | _user |
Undocumented |
Function | _user |
Undocumented |
Constant | _BORDER |
Undocumented |
Constant | _DEFAULT |
Undocumented |
Constant | _DEFAULT |
Undocumented |
Constant | _DEFAULT |
Undocumented |
Constant | _DEFAULT |
Undocumented |
Constant | _DEFAULT |
Undocumented |
Constant | _DEFAULT |
Undocumented |
Constant | _DEFAULT |
Undocumented |
Constant | _DEFAULT |
Undocumented |
Variable | _canvas |
Undocumented |
Variable | _canvas |
Undocumented |
Variable | _keys |
Undocumented |
Variable | _mouse |
Undocumented |
Variable | _mouse |
Undocumented |
Variable | _pen |
Undocumented |
Variable | _window |
Undocumented |
Variable | _xmax |
Undocumented |
Variable | _xmin |
Undocumented |
Variable | _ymax |
Undocumented |
Variable | _ymin |
Undocumented |
Draw an annulus centered at (x, y) with outer radius r1, and inner radius r2.
An annulus is a ring shape region between two circles centered at the same point but the outer circle r1 has larger radius than the inner circle r2
Parameters | |
x:float | x-coordinate of the center of the two circles |
y:float | x-coordinate of the center of the two circles |
r1:float | radius of of the outer circle (larger radius) |
r2:float | radius of of the inner circle (smaller radius) |
Draw an arc portion between angle1 and angle2, of the circumference of a circle centered at (x, y) with a radius r.
An arc is a contiguous portion of a circle between angle1 and angle2. Note that the line of arc starts at angle1 and goes to angle2 in counter clock-wise direction.
Parameters | |
x:float | x-coordinate of the center of the circle |
y:float | y-coordinate of the center of the circle |
r:float | the radius of the circle |
angle1:float | the starting angle of the arc |
angle2:float | the ending angle of the arc |
Draw on the background canvas a circle of radius r centered on (x, y).
Parameters | |
x:float | x-coordinate of the center of the circle |
y:float | y-coordinate of the center of the circle |
r:float | radius of the circle |
Clear the background canvas to color c, where c is an object of class Color. c defaults to dudraw.WHITE.
Parameters | |
c:Color | the color to be used to clear the background, defaults to white |
Clear the background canvas to color defined by r, g, and b. Defaults to white (255, 255, 255).
Parameters | |
r:float | red color value. 0 for minimum red and 255 for maximum red, defaults to 255 |
g:float | green color value. 0 for minimum red and 255 for maximum green, defaults to 255 |
b:float | blue color value. 0 for minimum red and 255 for maximum blue, defaults to 255 |
Draw on the background canvas an ellipse centered at (x, y) with a width of 2.0 * half_width, and a height of 2.0 * half_height.
Parameters | |
x:float | x-coordinate of the center of the ellipse |
y:float | y-coordinate of the center of the ellipse |
halffloat | half the width of the ellipse. Width is the maximum horizontal distance between two points on the surface of the ellipse |
halffloat | half the height of the ellipse. Height is the maximum vertical distance between two points on the surface of the ellipse |
Draw an arc portion between angle1 and angle2, of the circumference of an ellipse centered at (x, y) with a width of half_width, and a height of 2.0 * half_height.
An arc is a contiguous portion of the ellipse between angle1 and angle2. Note that the line of arc starts at angle1 and goes to angle2 in counter clock-wise direction.
Parameters | |
x:float | x-coordinate of the center of the ellipse |
y:float | y-coordinate of the center of the ellipse |
halffloat | half the width of the ellipse. Width is the maximum horizontal distance between two points on the surface of the ellipse |
halffloat | half the height of the ellipse. Height is the maximum vertical distance between two points on the surface of the ellipse |
angle1:float | the starting angle of the arc |
angle2:float | the ending angle of the arc |
Draw a sector portion between angle1 and angle2, of the interior of an ellipse centered at (x, y) with a width of half_width, and a height of 2.0 * half_height.
This is like a slice of an elliptical shaped pizza. Note that the line of the arc of the sector starts at angle1 and goes to angle2 in counter clock-wise direction.
Parameters | |
x:float | x-coordinate of the center of the ellipse |
y:float | y-coordinate of the center of the ellipse |
halffloat | half the width of the ellipse. Width is the maximum horizontal distance between two points on the surface of the ellipse |
halffloat | half the height of the ellipse. Height is the maximum vertical distance between two points on the surface of the ellipse |
angle1:float | the starting angle of the arc |
angle2:float | the ending angle of the arc |
Draw a filled annulus centered at (x, y) with outer radius r1, and inner radius r2.
An annulus is a ring shape region between two circles centered at the same point but the outer circle r1 has larger radius than the inner circle r2
Parameters | |
x:float | x-coordinate of the center of the two circles |
y:float | x-coordinate of the center of the two circles |
r1:float | radius of of the outer circle (larger radius) |
r2:float | radius of of the inner circle (smaller radius) |
Draw on the background canvas a filled circle of radius r centered on (x, y).
Parameters | |
x:float | x-coordinate of the center of the circle |
y:float | y-coordinate of the center of the circle |
r:float | radius of the circle |
Draw on the background canvas a filled ellipse centered at (x, y) with a width of 2.0 * half_width, and a height of 2.0 * half_height.
Parameters | |
x:float | x-coordinate of the center of the ellipse |
y:float | y-coordinate of the center of the ellipse |
halffloat | half the width of the ellipse. Width is the maximum horizontal distance between two points on the surface of the ellipse |
halffloat | half the height of the ellipse. Height is the maximum vertical distance between two points on the surface of the ellipse |
Draw a filled sector portion between angle1 and angle2, of the interior of an ellipse centered at (x, y) with a width of half_width, and a height of 2.0 * half_height.
This is like a slice of an elliptical shaped pizza. Note that the line of the arc of the sector starts at angle1 and goes to angle2 in counter clock-wise direction.
Parameters | |
x:float | x-coordinate of the center of the ellipse |
y:float | y-coordinate of the center of the ellipse |
halffloat | half the width of the ellipse. Width is the maximum horizontal distance between two points on the surface of the ellipse |
halffloat | half the height of the ellipse. Height is the maximum vertical distance between two points on the surface of the ellipse |
angle1:float | the starting angle of the arc |
angle2:float | the ending angle of the arc |
Draw on the background canvas a filled polygon with coordinates (x[i], y[i]).
The lists x and y must contain the same number of values. The two lists correspond to x-coordinates and y-coordinates of points (x[0], y[0]), (x[1], y[1]), (x[2], y[2]),..., (x[-1], y[-1]) on the polygon. Each point on the polygon connects to the point that follows it so (x_0, x_0) connects to (x[1], y[1]) with a straight line, then (x[1], y[1]) connects to (x[2], y[2]) and so on until (x[-1], y[-1]) connects to (x[0], y[0]).
Parameters | |
x:Sequence[ | a list of x-coordinates of the points on the polygon |
y:Sequence[ | a list of y-coordinates of the points on the polygon |
Draw a filled quadrilateral on the background canvas with corners at (x0, y0), (x1, y1), (x2, y2), and (x3, y3).
Parameters | |
x0:float | x-coordinate of the first point of the quadrilateral |
y0:float | y-coordinate of the first point of the quadrilateral |
x1:float | x-coordinate of the second point of the quadrilateral |
y1:float | y-coordinate of the second point of the quadrilateral |
x2:float | x-coordinate of the third point of the quadrilateral |
y2:float | y-coordinate of the third point of the quadrilateral |
x3:float | x-coordinate of the fourth point of the quadrilateral |
y3:float | y-coordinate of the fourth point of the quadrilateral |
Draw on the background canvas a rectangle of width (2 * halfWidth and height (2 * halfHeight) centered at point (x, y).
Parameters | |
x:float | x-coordinate of the center of the rectangle |
y:float | y-coordinate of the center of the rectangle |
halffloat | half the width of the rectangle |
halffloat | half the height of the rectangle |
Draw a filled sector portion between angle1 and angle2, of the interior of a circle centered at (x, y) with a radius r.
This is like a slice of circle shaped pizza. Note that the line of the arc of the sector starts at angle1 and goes to angle2 in counter clock-wise direction.
Parameters | |
x:float | x-coordinate of the center of the circle |
y:float | y-coordinate of the center of the circle |
r:float | the radius of the circle |
angle1:float | the starting angle of the arc |
angle2:float | the ending angle of the arc |
Draw on the background canvas a filled square whose sides are of length 2r, centered on (x, y).
Parameters | |
x:float | x-coordinate of the center of the square |
y:float | y-coordinate of the center of the square |
r:float | half the width of the square |
Draw a filled triangle on the background canvas with corners at (x0, y0), (x1, y1), and (x2, y2).
Parameters | |
x0:float | x-coordinate of the first point of the triangle |
y0:float | y-coordinate of the first point of the triangle |
x1:float | x-coordinate of the second point of the triangle |
y1:float | y-coordinate of the second point of the triangle |
x2:float | x-coordinate of the third point of the triangle |
y2:float | y-coordinate of the third point of the triangle |
Return the height of the current canvas.
Returns | |
float | the canvas height in pixels |
Return the width of the current canvas.
Returns | |
float | the canvas width in pixels |
Return the pen color as an object of class Color.
Returns | |
the current value of pen color. This is an object of class Color |
Return the color of the pixel at the given user coordinates.
Parameters | |
x:float | the x-coordinate of the pixel |
y:float | the y-coordinate of the pixel |
Returns | |
Color | the color of the pixel at (x, y) |
Return True if the queue of keys the user typed is not empty. Otherwise return False.
Returns | |
bool | true if a keyboard key is in the queue; false otherwise |
Draw on the background canvas a line from (x0, y0) to (x1, y1).
The placement of the line on the canvas will depend on the values of (x1, y1), (x2, y2) as well as the x-scale and y-scale. Note that if the coordinates are outside the range of min and max x-scale or y-scale then the point won't appear on the canvas
Parameters | |
x0:float | x-coordinate of the first point of the line segment |
y0:float | y-coordinate of the first point of the line segment |
x1:float | x-coordinate of the second point of the line segment |
y1:float | y-coordinate of the second point of the line segment |
Return True if the mouse has been left-clicked since the last time mousePressed was called, and False otherwise.
Returns | |
bool | true if the left mouse button has been pressed; false otherwise |
Return the x coordinate in user space of the location at which the mouse was most recently left-clicked.
If a left-click hasn't happened yet, raise an exception, since mouseX() shouldn't be called until mousePressed() returns True.
Returns | |
float | the x-coordinate of the location of the mouse |
Raises | |
Exception | error if mouse has not been clicked yet |
Return the y coordinate in user space of the location at which the mouse was most recently left-clicked.
If a left-click hasn't happened yet, raise an exception, since mouseY() shouldn't be called until mousePressed() returns True.
Returns | |
float | the y-coordinate of the location of the mouse |
Raises | |
Exception | error if mouse has not been clicked yet |
Remove the first key from the queue of keys that the the user typed, and return that key.
Returns | |
str | a string representing the next key in the queue |
Draw pic on the background canvas centered at (x, y).
The file can be of type .jpg, .png, .gif or .bmp. Filepath is specified as a string, and (x, y) defaults to the midpoint of the background canvas.
Parameters | |
filepath:str | a string representing the path of the image file |
x:float | x-coordinate of the center of the image, defaults to x-coordinate of the center of the canvas |
y:float | y-coordinate of the center of the image, defaults to y-coordinate of the center of the canvas |
Draw on the canvas a point at coordinates (x, y).
The placement of the point on the canvas will depend on the values of (x, y) as well as the x-scale and y-scale. Note that if the coordinates are outside the range of min and max x-scale or y-scale then the point won't appear on the canvas
Parameters | |
x:float | the x-coordinate of the point |
y:float | the y-coordinate of the point |
Draw on the background canvas a polygon with coordinates (x[i], y[i]).
The lists x and y must contain the same number of values. The two lists correspond to x-coordinates and y-coordinates of points (x[0], y[0]), (x[1], y[1]), (x[2], y[2]),..., (x[-1], y[-1]) on the polygon. Each point on the polygon connects to the point that follows it so (x_0, x_0) connects to (x[1], y[1]) with a straight line, then (x[1], y[1]) connects to (x[2], y[2]) and so on until (x[-1], y[-1]) connects to (x[0], y[0]).
Parameters | |
x:Sequence[ | a list of x-coordinates of the points on the polygon |
y:Sequence[ | a list of y-coordinates of the points on the polygon |
Draw on the background canvas a polyline with coordinates (x[i], y[i]).
The lists x and y must contain the same number of values. The two lists correspond to x-coordinates and y-coordinates of points (x[0], y[0]), (x[1], y[1]), (x[2], y[2]),..., (x[-1], y[-1]) on the polyline. Each point on the polyline connects to the point that follows it so (x_0, x_0) connects to (x[1], y[1]) with a straight line, then (x[1], y[1]) connects to (x[2], y[2]) and so on.
Parameters | |
x:Sequence[ | a list of x-coordinates of the points on the polyline |
y:Sequence[ | a list of y-coordinates of the points on the polyline |
Draw a quadrilateral on the background canvas with corners at (x0, y0), (x1, y1), (x2, y2), and (x3, y3).
Parameters | |
x0:float | x-coordinate of the first point of the quadrilateral |
y0:float | y-coordinate of the first point of the quadrilateral |
x1:float | x-coordinate of the second point of the quadrilateral |
y1:float | y-coordinate of the second point of the quadrilateral |
x2:float | x-coordinate of the third point of the quadrilateral |
y2:float | y-coordinate of the third point of the quadrilateral |
x3:float | x-coordinate of the fourth point of the quadrilateral |
y3:float | y-coordinate of the fourth point of the quadrilateral |
Draw on the background canvas a rectangle of width (2 * halfWidth and height (2 * halfHeight) centered at point (x, y).
Parameters | |
x:float | x-coordinate of the center of the rectangle |
y:float | y-coordinate of the center of the rectangle |
halffloat | half the width of the rectangle |
halffloat | half the height of the rectangle |
Save the window canvas as a .jpg to filepath specified.
Parameters | |
filepath:str | the path of a folder to which the image will be saved |
Draw a sector portion between angle1 and angle2, of the interior of a circle centered at (x, y) with a radius r.
This is like a slice of circle shaped pizza. Note that the line of the arc of the sector starts at angle1 and goes to angle2 in counter clock-wise direction.
Parameters | |
x:float | x-coordinate of the center of the circle |
y:float | y-coordinate of the center of the circle |
r:float | the radius of the circle |
angle1:float | the starting angle of the arc |
angle2:float | the ending angle of the arc |
Set the size of the canvas to w pixels wide and h pixels high.
Calling this function is optional. If you call it, you must do so before calling any drawing function.
Parameters | |
w:float | width of canvas in pixels, defaults to 512 |
h:float | height of canvas in pixels, defaults to 512 |
Raises | |
Exception | error if the dudraw window was already created |
Exception | error if width or height values are non-positive |
Set the font family to f (e.g. 'Helvetica' or 'Courier').
This changes the font used to draw text on the canvas.
Parameters | |
f:str | the new font used for text on canvas, defaults to "Helvetica" if no font is specified |
Set the font size to s (e.g. 12, 14, 16..etc).
the value of the font size is measured in point. A point is equivalent to about 1.33 pixels
Parameters | |
s:int | new font size in point, defaults to 12 if no value is specified |
Set the pen color to c, where c is an object of class Color. c defaults to dudraw.BLACK.
Parameters | |
c:Color | the new pen color, defaults to black if no value is passed |
Set the pen color using red, green, and blue values. Defaults to black.
Parameters | |
r:int | red color value. 0 for minimum red and 255 for maximum red, defaults to 255 |
g:int | green color value. 0 for minimum red and 255 for maximum green, defaults to 255 |
b:int | blue color value. 0 for minimum red and 255 for maximum blue, defaults to 255 |
Set the pen width/radius to w
This affects the subsequent drawing of points and lines. If w is 0.0, then points will be drawn with the minimum possible width and lines with the minimum possible width.
Parameters | |
w:float | new value for the pen radius in pixels. This value must be non-negative, defaults to 0.0 |
Raises | |
Exception | error thrown if the value of w is negative |
Set the x-scale and y-scale of the canvas to the same range for both directions.
The value of max must be greater than the value of min
Parameters | |
min:float | the minimum value of the x-scale and y-scale, defaults to 0.0 if no value is passed |
max:float | the maximum value of the x-scale and y-scale, defaults to 1.0 if no value is passed |
Raises | |
Exception | error if the min value is greater or equal to the max value |
Set the x-scale of the canvas such that the minimum y value is min and the maximum y value is max.
The value of max must be greater than the value of min
Parameters | |
min:float | the minimum value of the x-scale, defaults to 0.0 if no value is passed |
max:float | the maximum value of the x-scale, defaults to 1.0 if no value is passed |
Raises | |
Exception | error if the min value is greater or equal to the max value |
Set the y-scale of the canvas such that the minimum y value is min and the maximum y value is max.
The value of max must be greater than the value of min
Parameters | |
min:float | the minimum value of the y-scale, defaults to 0.0 if no value is passed |
max:float | the maximum value of the y-scale, defaults to 1.0 if no value is passed |
Raises | |
Exception | error if the min value is greater or equal to the max value |
Copy the background canvas to the window canvas, and then wait for msec milliseconds. msec defaults to 0.0.
Note that everything we draw is on the background canvas so won't show on the screen until we call show
Parameters | |
msec:float | amount of milliseconds to wait after show, defaults to 0.0 |
Draw on the background canvas a square whose sides are of length 2r, centered on (x, y).
Parameters | |
x:float | x-coordinate of the center of the square |
y:float | y-coordinate of the center of the square |
r:float | half the width of the square |
Draw a line of string on the background canvas centered at (x, y).
The string will appear on a single line. Note that (x, y) is the center of the rectangle that bounds the string. The string uses the current font and font size. Font and font size can be modified using the methods: set_font_family and set_font_size
Parameters | |
x:float | x-coordinate of the center of the text |
y:float | y-coordinate of the center of the text |
s:str | the string that will be draw on the canvas |
Draw a triangle on the background canvas with corners at (x0, y0), (x1, y1), and (x2, y2).
Parameters | |
x0:float | x-coordinate of the first point of the triangle |
y0:float | y-coordinate of the first point of the triangle |
x1:float | x-coordinate of the second point of the triangle |
y1:float | y-coordinate of the second point of the triangle |
x2:float | x-coordinate of the third point of the triangle |
y2:float | y-coordinate of the third point of the triangle |
Check if any new event has occured (such as a key typed or button pressed). If a key has been typed, then put that key in a queue.
Dispatch to a function that does regression testing, or to a dialog-box-handling function.
Draw on the background canvas a pixel at (x, y).
Parameters | |
x:float | Undocumented |
y:float | Undocumented |
Convert c, an object of type Color, to an equivalent object of type pygame.Color. Return the result.
Parameters | |
c:Color | Undocumented |
Returns | |
pygame.Color | Undocumented |
Undocumented
Parameters | |
p:Sequence[ | Undocumented |
Returns | |
Sequence[ | Undocumented |
Copy the background canvas to the window canvas. Then wait forever, that is, until the user closes the dudraw window.