doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
pygame.mixer.music.get_endevent()
get the event a channel sends when playback stops get_endevent() -> type Returns the event type to be sent every time the music finishes playback. If there is no endevent the function returns pygame.NOEVENT. | pygame.ref.music#pygame.mixer.music.get_endevent |
pygame.mixer.music.get_pos()
get the music play time get_pos() -> time This gets the number of milliseconds that the music has been playing for. The returned time only represents how long the music has been playing; it does not take into account any starting position offsets. | pygame.ref.music#pygame.mixer.music.get_pos |
pygame.mixer.music.get_volume()
get the music volume get_volume() -> value Returns the current volume for the mixer. The value will be between 0.0 and 1.0. | pygame.ref.music#pygame.mixer.music.get_volume |
pygame.mixer.music.load()
Load a music file for playback load(filename) -> None load(object) -> None This will load a music filename/file object and prepare it for playback. If a music stream is already playing it will be stopped. This does not start the music playing. | pygame.ref.music#pygame.mixer.music.load |
pygame.mixer.music.pause()
temporarily stop music playback pause() -> None Temporarily stop playback of the music stream. It can be resumed with the pygame.mixer.music.unpause() function. | pygame.ref.music#pygame.mixer.music.pause |
pygame.mixer.music.play()
Start the playback of the music stream play(loops=0, start=0.0, fade_ms = 0) -> None This will play the loaded music stream. If the music is already playing it will be restarted. loops is an optional integer argument, which is 0 by default, it tells how many times to repeat the music. The m... | pygame.ref.music#pygame.mixer.music.play |
pygame.mixer.music.queue()
queue a sound file to follow the current queue(filename) -> None This will load a sound file and queue it. A queued sound file will begin as soon as the current sound naturally ends. Only one sound can be queued at a time. Queuing a new sound while another sound is queued will result in th... | pygame.ref.music#pygame.mixer.music.queue |
pygame.mixer.music.rewind()
restart music rewind() -> None Resets playback of the current music to the beginning. | pygame.ref.music#pygame.mixer.music.rewind |
pygame.mixer.music.set_endevent()
have the music send an event when playback stops set_endevent() -> None set_endevent(type) -> None This causes pygame to signal (by means of the event queue) when the music is done playing. The argument determines the type of event that will be queued. The event will be queued every... | pygame.ref.music#pygame.mixer.music.set_endevent |
pygame.mixer.music.set_pos()
set position to play from set_pos(pos) -> None This sets the position in the music file where playback will start. The meaning of "pos", a float (or a number that can be converted to a float), depends on the music format. For MOD files, pos is the integer pattern number in the module. Fo... | pygame.ref.music#pygame.mixer.music.set_pos |
pygame.mixer.music.set_volume()
set the music volume set_volume(volume) -> None Set the volume of the music playback. The volume argument is a float between 0.0 and 1.0 that sets volume. When new music is loaded the volume is reset to full volume. | pygame.ref.music#pygame.mixer.music.set_volume |
pygame.mixer.music.stop()
stop the music playback stop() -> None Stops the music playback if it is currently playing. It Won't Unload the music. | pygame.ref.music#pygame.mixer.music.stop |
pygame.mixer.music.unload()
Unload the currently loaded music to free up resources unload() -> None This closes resources like files for any music that may be loaded. New in pygame 2.0.0. | pygame.ref.music#pygame.mixer.music.unload |
pygame.mixer.music.unpause()
resume paused music unpause() -> None This will resume the playback of a music stream after it has been paused. | pygame.ref.music#pygame.mixer.music.unpause |
pygame.mixer.pause()
temporarily stop playback of all sound channels pause() -> None This will temporarily stop all playback on the active mixer channels. The playback can later be resumed with pygame.mixer.unpause() | pygame.ref.mixer#pygame.mixer.pause |
pygame.mixer.pre_init()
preset the mixer init arguments pre_init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None) -> None Call pre_init to change the defaults used when the real pygame.mixer.init() is called. Keyword arguments are accepted. The best way to set custom mixer playback values is to ca... | pygame.ref.mixer#pygame.mixer.pre_init |
pygame.mixer.quit()
uninitialize the mixer quit() -> None This will uninitialize pygame.mixer. All playback will stop and any loaded Sound objects may not be compatible with the mixer if it is reinitialized later. | pygame.ref.mixer#pygame.mixer.quit |
pygame.mixer.set_num_channels()
set the total number of playback channels set_num_channels(count) -> None Sets the number of available channels for the mixer. The default value is 8. The value can be increased or decreased. If the value is decreased, sounds playing on the truncated channels are stopped. | pygame.ref.mixer#pygame.mixer.set_num_channels |
pygame.mixer.set_reserved()
reserve channels from being automatically used set_reserved(count) -> None The mixer can reserve any number of channels that will not be automatically selected for playback by Sounds. If sounds are currently playing on the reserved channels they will not be stopped. This allows the applic... | pygame.ref.mixer#pygame.mixer.set_reserved |
pygame.mixer.Sound
Create a new Sound object from a file or buffer object Sound(filename) -> Sound Sound(file=filename) -> Sound Sound(buffer) -> Sound Sound(buffer=buffer) -> Sound Sound(object) -> Sound Sound(file=object) -> Sound Sound(array=object) -> Sound Load a new sound buffer from a filename, a python file ... | pygame.ref.mixer#pygame.mixer.Sound |
fadeout()
stop sound playback after fading out fadeout(time) -> None This will stop playback of the sound after fading it out over the time argument in milliseconds. The Sound will fade and stop on all actively playing channels. | pygame.ref.mixer#pygame.mixer.Sound.fadeout |
get_length()
get the length of the Sound get_length() -> seconds Return the length of this Sound in seconds. | pygame.ref.mixer#pygame.mixer.Sound.get_length |
get_num_channels()
count how many times this Sound is playing get_num_channels() -> count Return the number of active channels this sound is playing on. | pygame.ref.mixer#pygame.mixer.Sound.get_num_channels |
get_raw()
return a bytestring copy of the Sound samples. get_raw() -> bytes Return a copy of the Sound object buffer as a bytes (for Python 3.x) or str (for Python 2.x) object. New in pygame 1.9.2. | pygame.ref.mixer#pygame.mixer.Sound.get_raw |
get_volume()
get the playback volume get_volume() -> value Return a value from 0.0 to 1.0 representing the volume for this Sound. | pygame.ref.mixer#pygame.mixer.Sound.get_volume |
play()
begin sound playback play(loops=0, maxtime=0, fade_ms=0) -> Channel Begin playback of the Sound (i.e., on the computer's speakers) on an available Channel. This will forcibly select a Channel, so playback may cut off a currently playing sound if necessary. The loops argument controls how many times the sample... | pygame.ref.mixer#pygame.mixer.Sound.play |
set_volume()
set the playback volume for this Sound set_volume(value) -> None This will set the playback volume (loudness) for this Sound. This will immediately affect the Sound if it is playing. It will also affect any future playback of this Sound.
Parameters:
value (float) -- volume in the range of 0.0 to 1... | pygame.ref.mixer#pygame.mixer.Sound.set_volume |
stop()
stop sound playback stop() -> None This will stop the playback of this Sound on any active Channels. | pygame.ref.mixer#pygame.mixer.Sound.stop |
pygame.mixer.stop()
stop playback of all sound channels stop() -> None This will stop all playback of all active mixer channels. | pygame.ref.mixer#pygame.mixer.stop |
pygame.mixer.unpause()
resume paused playback of sound channels unpause() -> None This will resume all active sound channels after they have been paused. | pygame.ref.mixer#pygame.mixer.unpause |
pygame.mouse
pygame module to work with the mouse The mouse functions can be used to get the current state of the mouse device. These functions can also alter the system cursor for the mouse. When the display mode is set, the event queue will start receiving mouse events. The mouse buttons generate pygame.MOUSEBUT... | pygame.ref.mouse |
pygame.pixelcopy
pygame module for general pixel array copying The pygame.pixelcopy module contains functions for copying between surfaces and objects exporting an array structure interface. It is a backend for pygame.surfarray, adding NumPy support. But pixelcopy is more general, and intended for direct use. The ... | pygame.ref.pixelcopy |
pygame
the top level pygame package The pygame package represents the top-level package for others to use. Pygame itself is broken into many submodules, but this does not affect programs that use pygame. As a convenience, most of the top-level variables in pygame have been placed inside a module named pygame.local... | pygame.ref.pygame |
pygame.scrap
pygame module for clipboard support. EXPERIMENTAL!: This API may change or disappear in later pygame releases. If you use this, your code may break with the next pygame release. The scrap module is for transferring data to/from the clipboard. This allows for cutting and pasting data between pygame and... | pygame.ref.scrap |
pygame.sndarray
pygame module for accessing sound sample data Functions to convert between NumPy arrays and Sound objects. This module will only be available when pygame can use the external NumPy package. Sound data is made of thousands of samples per second, and each sample is the amplitude of the wave at a part... | pygame.ref.sndarray |
pygame.sprite
pygame module with basic game object classes This module contains several simple classes to be used within games. There is the main Sprite class and several Group classes that contain Sprites. The use of these classes is entirely optional when using pygame. The classes are fairly lightweight and only... | pygame.ref.sprite |
pygame.surfarray
pygame module for accessing surface pixel data using array interfaces Functions to convert pixel data between pygame Surfaces and arrays. This module will only be functional when pygame can use the external NumPy package. Every pixel is stored as a single integer value to represent the red, green,... | pygame.ref.surfarray |
pygame.tests
Pygame unit test suite package A quick way to run the test suite package from the command line is to import the go submodule with the Python -m option: python -m pygame.tests [<test options>] Command line option --help displays a usage message. Available options correspond to the pygame.tests.run() ar... | pygame.ref.tests |
pygame.time
pygame module for monitoring time Times in pygame are represented in milliseconds (1/1000 seconds). Most platforms have a limited time resolution of around 10 milliseconds. This resolution, in milliseconds, is given in the TIMER_RESOLUTION constant. pygame.time.get_ticks()
get the time in milliseco... | pygame.ref.time |
pygame.transform
pygame module to transform surfaces A Surface transform is an operation that moves or resizes the pixels. All these functions take a Surface to operate on and return a new Surface with the results. Some of the transforms are considered destructive. These means every time they are performed they lo... | pygame.ref.transform |
pygame.mouse.get_cursor()
get the image of the mouse cursor get_cursor() -> (size, hotspot, xormasks, andmasks) Get the information about the mouse system cursor. The return value is the same data as the arguments passed into pygame.mouse.set_cursor(). Note This method is unavailable with pygame 2, as SDL2 does not... | pygame.ref.mouse#pygame.mouse.get_cursor |
pygame.mouse.get_focused()
check if the display is receiving mouse input get_focused() -> bool Returns true when pygame is receiving mouse input events (or, in windowing terminology, is "active" or has the "focus"). This method is most useful when working in a window. By contrast, in full-screen mode, this method al... | pygame.ref.mouse#pygame.mouse.get_focused |
pygame.mouse.get_pos()
get the mouse cursor position get_pos() -> (x, y) Returns the x and y position of the mouse cursor. The position is relative to the top-left corner of the display. The cursor position can be located outside of the display window, but is always constrained to the screen. | pygame.ref.mouse#pygame.mouse.get_pos |
pygame.mouse.get_pressed()
get the state of the mouse buttons get_pressed(num_buttons=3) -> (button1, button2, button3) get_pressed(num_buttons=5) -> (button1, button2, button3, button4, button5) Returns a sequence of booleans representing the state of all the mouse buttons. A true value means the mouse is currently... | pygame.ref.mouse#pygame.mouse.get_pressed |
pygame.mouse.get_rel()
get the amount of mouse movement get_rel() -> (x, y) Returns the amount of movement in x and y since the previous call to this function. The relative movement of the mouse cursor is constrained to the edges of the screen, but see the virtual input mouse mode for a way around this. Virtual inpu... | pygame.ref.mouse#pygame.mouse.get_rel |
pygame.mouse.get_visible()
get the current visibility state of the mouse cursor get_visible() -> bool Get the current visibility state of the mouse cursor. True if the mouse is visible, False otherwise. New in pygame 2.0.0. | pygame.ref.mouse#pygame.mouse.get_visible |
pygame.mouse.set_cursor()
set the image for the mouse cursor set_cursor(size, hotspot, xormasks, andmasks) -> None When the mouse cursor is visible, it will be displayed as a black and white bitmap using the given bitmask arrays. The size is a sequence containing the cursor width and height. hotspot is a sequence co... | pygame.ref.mouse#pygame.mouse.set_cursor |
pygame.mouse.set_pos()
set the mouse cursor position set_pos([x, y]) -> None Set the current mouse position to arguments given. If the mouse cursor is visible it will jump to the new coordinates. Moving the mouse will generate a new pygame.MOUSEMOTION event. | pygame.ref.mouse#pygame.mouse.set_pos |
pygame.mouse.set_system_cursor()
set the mouse cursor to a system variant set_system_cursor(constant) -> None When the mouse cursor is visible, it will displayed as a operating system specific variant of the options below. Pygame Cursor Constant Description
--------------------------------------------
pyga... | pygame.ref.mouse#pygame.mouse.set_system_cursor |
pygame.mouse.set_visible()
hide or show the mouse cursor set_visible(bool) -> bool If the bool argument is true, the mouse cursor will be visible. This will return the previous visible state of the cursor. | pygame.ref.mouse#pygame.mouse.set_visible |
pygame.Overlay
pygame object for video overlay graphics Overlay(format, (width, height)) -> Overlay The Overlay objects provide support for accessing hardware video overlays. Video overlays do not use standard RGB pixel formats, and can use multiple resolutions of data to create a single image. The Overlay objects... | pygame.ref.overlay |
display()
set the overlay pixel data display((y, u, v)) -> None display() -> None Display the YUV data in SDL's overlay planes. The y, u, and v arguments are strings of binary data. The data must be in the correct format used to create the Overlay. If no argument is passed in, the Overlay will simply be redrawn with... | pygame.ref.overlay#pygame.Overlay.display |
get_hardware()
test if the Overlay is hardware accelerated get_hardware(rect) -> int Returns a True value when the Overlay is hardware accelerated. If the platform does not support acceleration, software rendering is used. | pygame.ref.overlay#pygame.Overlay.get_hardware |
set_location()
control where the overlay is displayed set_location(rect) -> None Set the location for the overlay. The overlay will always be shown relative to the main display Surface. This does not actually redraw the overlay, it will be updated on the next call to Overlay.display(). | pygame.ref.overlay#pygame.Overlay.set_location |
pygame.PixelArray
pygame object for direct pixel access of surfaces PixelArray(Surface) -> PixelArray The PixelArray wraps a Surface and provides direct access to the surface's pixels. A pixel array can be one or two dimensional. A two dimensional array, like its surface, is indexed [column, row]. Pixel arrays sup... | pygame.ref.pixelarray |
close()
Closes the PixelArray, and releases Surface lock. transpose() -> PixelArray This method is for explicitly closing the PixelArray, and releasing a lock on the Suface. New in pygame 1.9.4. | pygame.ref.pixelarray#pygame.PixelArray.close |
compare()
Compares the PixelArray with another one. compare(array, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray Compares the contents of the PixelArray with those from the passed in PixelArray. It returns a new PixelArray with a black/white color mask that indicates the differences (black) of both arrays... | pygame.ref.pixelarray#pygame.PixelArray.compare |
extract()
Extracts the passed color from the PixelArray. extract(color, distance=0, weights=(0.299, 0.587, 0.114)) -> PixelArray Extracts the passed color by changing all matching pixels to white, while non-matching pixels are changed to black. This returns a new PixelArray with the black/white color mask. It uses a... | pygame.ref.pixelarray#pygame.PixelArray.extract |
itemsize
Returns the byte size of a pixel array item itemsize -> int This is the same as Surface.get_bytesize() for the pixel array's surface. New in pygame 1.9.2. | pygame.ref.pixelarray#pygame.PixelArray.itemsize |
make_surface()
Creates a new Surface from the current PixelArray. make_surface() -> Surface Creates a new Surface from the current PixelArray. Depending on the current PixelArray the size, pixel order etc. will be different from the original Surface. # Create a new surface flipped around the vertical axis.
sf = pxar... | pygame.ref.pixelarray#pygame.PixelArray.make_surface |
ndim
Returns the number of dimensions. ndim -> int A pixel array can be 1 or 2 dimensional. New in pygame 1.9.2. | pygame.ref.pixelarray#pygame.PixelArray.ndim |
replace()
Replaces the passed color in the PixelArray with another one. replace(color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)) -> None Replaces the pixels with the passed color in the PixelArray by changing them them to the passed replacement color. It uses a simple weighted Euclidean distance formula t... | pygame.ref.pixelarray#pygame.PixelArray.replace |
shape
Returns the array size. shape -> tuple of int's A tuple or length ndim giving the length of each dimension. Analogous to Surface.get_size(). New in pygame 1.9.2. | pygame.ref.pixelarray#pygame.PixelArray.shape |
strides
Returns byte offsets for each array dimension. strides -> tuple of int's A tuple or length ndim byte counts. When a stride is multiplied by the corresponding index it gives the offset of that index from the start of the array. A stride is negative for an array that has is inverted (has a negative step). New... | pygame.ref.pixelarray#pygame.PixelArray.strides |
surface
Gets the Surface the PixelArray uses. surface -> Surface The Surface the PixelArray was created for. | pygame.ref.pixelarray#pygame.PixelArray.surface |
transpose()
Exchanges the x and y axis. transpose() -> PixelArray This method returns a new view of the pixel array with the rows and columns swapped. So for a (w, h) sized array a (h, w) slice is returned. If an array is one dimensional, then a length 1 x dimension is added, resulting in a 2D pixel array. New in p... | pygame.ref.pixelarray#pygame.PixelArray.transpose |
pygame.pixelcopy.array_to_surface()
copy an array object to a surface array_to_surface(<surface>, <array>) -> None See pygame.surfarray.blit_array(). | pygame.ref.pixelcopy#pygame.pixelcopy.array_to_surface |
pygame.pixelcopy.make_surface()
Copy an array to a new surface pygame.pixelcopy.make_surface(array) -> Surface Create a new Surface that best resembles the data and format of the array. The array can be 2D or 3D with any sized integer values. | pygame.ref.pixelcopy#pygame.pixelcopy.make_surface |
pygame.pixelcopy.map_array()
copy an array to another array, using surface format map_array(<array>, <array>, <surface>) -> None Map an array of color element values - (w, h, ..., 3) - to an array of pixels - (w, h) according to the format of <surface>. | pygame.ref.pixelcopy#pygame.pixelcopy.map_array |
pygame.pixelcopy.surface_to_array()
copy surface pixels to an array object surface_to_array(array, surface, kind='P', opaque=255, clear=0) -> None The surface_to_array function copies pixels from a Surface object to a 2D or 3D array. Depending on argument kind and the target array dimension, a copy may be raw pixel ... | pygame.ref.pixelcopy#pygame.pixelcopy.surface_to_array |
pygame.quit()
uninitialize all pygame modules quit() -> None Uninitialize all pygame modules that have previously been initialized. When the Python interpreter shuts down, this method is called regardless, so your program should not need it, except when it wants to terminate its pygame resources and continue. It is ... | pygame.ref.pygame#pygame.quit |
pygame.Rect
pygame object for storing rectangular coordinates Rect(left, top, width, height) -> Rect Rect((left, top), (width, height)) -> Rect Rect(object) -> Rect Pygame uses Rect objects to store and manipulate rectangular areas. A Rect can be created from a combination of left, top, width, and height values. R... | pygame.ref.rect |
clamp()
moves the rectangle inside another clamp(Rect) -> Rect Returns a new rectangle that is moved to be completely inside the argument Rect. If the rectangle is too large to fit inside, it is centered inside the argument Rect, but its size is not changed. | pygame.ref.rect#pygame.Rect.clamp |
clamp_ip()
moves the rectangle inside another, in place clamp_ip(Rect) -> None Same as the Rect.clamp() method, but operates in place. | pygame.ref.rect#pygame.Rect.clamp_ip |
clip()
crops a rectangle inside another clip(Rect) -> Rect Returns a new rectangle that is cropped to be completely inside the argument Rect. If the two rectangles do not overlap to begin with, a Rect with 0 size is returned. | pygame.ref.rect#pygame.Rect.clip |
clipline()
crops a line inside a rectangle clipline(x1, y1, x2, y2) -> ((cx1, cy1), (cx2, cy2)) clipline(x1, y1, x2, y2) -> () clipline((x1, y1), (x2, y2)) -> ((cx1, cy1), (cx2, cy2)) clipline((x1, y1), (x2, y2)) -> () clipline((x1, y1, x2, y2)) -> ((cx1, cy1), (cx2, cy2)) clipline((x1, y1, x2, y2)) -> () clipline(((... | pygame.ref.rect#pygame.Rect.clipline |
collidedict()
test if one rectangle in a dictionary intersects collidedict(dict) -> (key, value) collidedict(dict) -> None collidedict(dict, use_values=0) -> (key, value) collidedict(dict, use_values=0) -> None Returns the first key and value pair that intersects with the calling Rect object. If no collisions are fo... | pygame.ref.rect#pygame.Rect.collidedict |
collidedictall()
test if all rectangles in a dictionary intersect collidedictall(dict) -> [(key, value), ...] collidedictall(dict, use_values=0) -> [(key, value), ...] Returns a list of all the key and value pairs that intersect with the calling Rect object. If no collisions are found an empty list is returned. If u... | pygame.ref.rect#pygame.Rect.collidedictall |
collidelist()
test if one rectangle in a list intersects collidelist(list) -> index Test whether the rectangle collides with any in a sequence of rectangles. The index of the first collision found is returned. If no collisions are found an index of -1 is returned. | pygame.ref.rect#pygame.Rect.collidelist |
collidelistall()
test if all rectangles in a list intersect collidelistall(list) -> indices Returns a list of all the indices that contain rectangles that collide with the Rect. If no intersecting rectangles are found, an empty list is returned. | pygame.ref.rect#pygame.Rect.collidelistall |
collidepoint()
test if a point is inside a rectangle collidepoint(x, y) -> bool collidepoint((x,y)) -> bool Returns true if the given point is inside the rectangle. A point along the right or bottom edge is not considered to be inside the rectangle. Note For collision detection between a rect and a line the cliplin... | pygame.ref.rect#pygame.Rect.collidepoint |
colliderect()
test if two rectangles overlap colliderect(Rect) -> bool Returns true if any portion of either rectangle overlap (except the top+bottom or left+right edges). Note For collision detection between a rect and a line the clipline() method can be used. | pygame.ref.rect#pygame.Rect.colliderect |
contains()
test if one rectangle is inside another contains(Rect) -> bool Returns true when the argument is completely inside the Rect. | pygame.ref.rect#pygame.Rect.contains |
copy()
copy the rectangle copy() -> Rect Returns a new rectangle having the same position and size as the original. New in pygame 1.9 | pygame.ref.rect#pygame.Rect.copy |
fit()
resize and move a rectangle with aspect ratio fit(Rect) -> Rect Returns a new rectangle that is moved and resized to fit another. The aspect ratio of the original Rect is preserved, so the new rectangle may be smaller than the target in either width or height. | pygame.ref.rect#pygame.Rect.fit |
inflate()
grow or shrink the rectangle size inflate(x, y) -> Rect Returns a new rectangle with the size changed by the given offset. The rectangle remains centered around its current center. Negative values will shrink the rectangle. Note, uses integers, if the offset given is too small(< 2 > -2), center will be off... | pygame.ref.rect#pygame.Rect.inflate |
inflate_ip()
grow or shrink the rectangle size, in place inflate_ip(x, y) -> None Same as the Rect.inflate() method, but operates in place. | pygame.ref.rect#pygame.Rect.inflate_ip |
move()
moves the rectangle move(x, y) -> Rect Returns a new rectangle that is moved by the given offset. The x and y arguments can be any integer value, positive or negative. | pygame.ref.rect#pygame.Rect.move |
move_ip()
moves the rectangle, in place move_ip(x, y) -> None Same as the Rect.move() method, but operates in place. | pygame.ref.rect#pygame.Rect.move_ip |
normalize()
correct negative sizes normalize() -> None This will flip the width or height of a rectangle if it has a negative size. The rectangle will remain in the same place, with only the sides swapped. | pygame.ref.rect#pygame.Rect.normalize |
union()
joins two rectangles into one union(Rect) -> Rect Returns a new rectangle that completely covers the area of the two provided rectangles. There may be area inside the new Rect that is not covered by the originals. | pygame.ref.rect#pygame.Rect.union |
union_ip()
joins two rectangles into one, in place union_ip(Rect) -> None Same as the Rect.union() method, but operates in place. | pygame.ref.rect#pygame.Rect.union_ip |
unionall()
the union of many rectangles unionall(Rect_sequence) -> Rect Returns the union of one rectangle with a sequence of many rectangles. | pygame.ref.rect#pygame.Rect.unionall |
unionall_ip()
the union of many rectangles, in place unionall_ip(Rect_sequence) -> None The same as the Rect.unionall() method, but operates in place. | pygame.ref.rect#pygame.Rect.unionall_ip |
update()
sets the position and size of the rectangle update(left, top, width, height) -> None update((left, top), (width, height)) -> None update(object) -> None Sets the position and size of the rectangle, in place. See parameters for pygame.Rect() for the parameters of this function. New in pygame 2.0.1. | pygame.ref.rect#pygame.Rect.update |
pygame.register_quit()
register a function to be called when pygame quits register_quit(callable) -> None When pygame.quit() is called, all registered quit functions are called. Pygame modules do this automatically when they are initializing, so this function will rarely be needed. | pygame.ref.pygame#pygame.register_quit |
pygame.scrap.contains()
Checks whether data for a given type is available in the clipboard. contains(type) -> bool Checks whether data for the given type is currently available in the clipboard.
Parameters:
type (string) -- data type to check availability of
Returns:
True if data for the passed type is avai... | pygame.ref.scrap#pygame.scrap.contains |
pygame.scrap.get()
Gets the data for the specified type from the clipboard. get(type) -> bytes or str or None Retrieves the data for the specified type from the clipboard. In python 3 the data is returned as a byte string and might need further processing (such as decoding to Unicode).
Parameters:
type (string... | pygame.ref.scrap#pygame.scrap.get |
pygame.scrap.get_init()
Returns True if the scrap module is currently initialized. get_init() -> bool Gets the scrap module's initialization state.
Returns:
True if the pygame.scrap module is currently initialized, False otherwise
Return type:
bool New in pygame 1.9.5. | pygame.ref.scrap#pygame.scrap.get_init |
pygame.scrap.get_types()
Gets a list of the available clipboard types. get_types() -> list Gets a list of data type string identifiers for the data currently available on the clipboard. Each identifier can be used in the pygame.scrap.get() method to get the clipboard content of the specific type.
Returns:
list ... | pygame.ref.scrap#pygame.scrap.get_types |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.