API Coverage
This document provides a reference of the pygame-ce API and implementation status in ipygame.
Legend:
- β Implemented - Function is fully implemented and tested
- β Not Implemented - Function is missing or stub only
- π« Not Applicable - Cannot be implemented in Jupyter environment
Last Updated: February 11, 2026
Table of Contents
Section titled βTable of Contentsβ- Core Module (pygame)
- pygame.display
- pygame.Surface
- pygame.draw
- pygame.event
- pygame.key
- pygame.mouse
- pygame.time
- pygame.font
- pygame.image
- pygame.transform
- pygame.sprite
- pygame.Rect / FRect
- pygame.Color
- pygame.math
- pygame.mask
- pygame.gfxdraw
- pygame.surfarray
- pygame.pixelcopy
- pygame.mixer
- pygame.mixer.music
- pygame.joystick
- pygame.camera
- pygame.freetype
- pygame.cursors
- pygame.midi
- pygame.sndarray
- pygame.scrap
- pygame.Window
- pygame.geometry
- pygame.system
- Summary Statistics
Core Module (pygame)
Section titled βCore Module (pygame)β| Function | Status | Notes |
|---|---|---|
pygame.init() | β | Returns (6, 0) tuple |
pygame.quit() | β | Cleans up backend state |
pygame.get_init() | β | Returns initialization status |
pygame.error | β | Exception class compatible with pygame |
pygame.get_error() | β | SDL error retrieval not applicable |
pygame.set_error() | β | SDL error setting not applicable |
pygame.get_sdl_version() | β | No SDL in ipygame |
pygame.get_sdl_byteorder() | β | No SDL in ipygame |
pygame.register_quit() | β | Quit callback registration |
pygame.encode_string() | β | String encoding utility |
pygame.encode_file_path() | β | Path encoding utility |
error() | β |
pygame.display
Section titled βpygame.displayβ| Function | Status | Notes |
|---|---|---|
display.init() | β | Initializes display module |
display.quit() | β | Uninitializes display, clears canvas |
display.get_init() | β | Returns init status |
display.set_mode(size, flags, depth, display, vsync) | β | Creates ipycanvas Canvas widget |
display.get_surface() | β | Returns current display Surface |
display.flip() | β | Updates entire display to canvas |
display.update(rectangle) | β | Updates display (currently full screen) |
display.get_driver() | β | Returns βipycanvasβ |
display.Info() | β | Returns basic info object |
display.get_wm_info() | β | Window manager info not applicable |
display.get_desktop_sizes() | β | Multi-monitor support N/A |
display.list_modes(depth, flags, display) | β | Mode enumeration N/A |
display.mode_ok(size, flags, depth) | β | Mode validation N/A |
display.gl_get_attribute(flag) | β | OpenGL not supported |
display.gl_set_attribute(flag, value) | β | OpenGL not supported |
display.get_active() | β | Window focus state |
display.iconify() | β | Stub (no effect in Jupyter) |
display.toggle_fullscreen() | β | Stub (no effect in Jupyter) |
display.set_gamma(red, green, blue) | β | Gamma correction N/A |
display.set_gamma_ramp(red, green, blue) | β | Gamma ramp N/A |
display.set_icon(surface) | β | Stored but not displayed |
display.set_caption(title, icontitle) | β | Stores caption string |
display.get_caption() | β | Returns caption tuple |
display.set_palette(palette) | β | Palette mode not used |
display.get_num_displays() | β | Multi-display N/A |
display.get_window_size() | β | Returns canvas dimensions |
display.get_allow_screensaver() | β | Screensaver control N/A |
display.set_allow_screensaver(bool) | β | Screensaver control N/A |
display.is_fullscreen() | β | Fullscreen state N/A |
pygame.Surface
Section titled βpygame.Surfaceβ| Method | Status | Notes |
|---|---|---|
Surface(size, flags, surface) | β | Creates surface matching another |
blit(source, dest, area, special_flags) | β | Blits with alpha blending |
blits(sequence, doreturn) | β | Multiple blits |
fblits(sequence, doreturn) | β | Fast blits without return |
convert(surface) | β | Converts format (returns self, already RGBA) |
convert_alpha(surface) | β | Converts to alpha format |
copy() | β | Creates surface copy |
fill(color, rect, special_flags) | β | Fills with solid color |
scroll(dx, dy) | β | Surface scrolling |
set_colorkey(color, flags) | β | Sets transparent color |
get_colorkey() | β | Returns colorkey |
set_alpha(value, flags) | β | Sets surface alpha |
get_alpha() | β | Returns surface alpha |
lock() | β | Locks surface (reference counting) |
unlock() | β | Unlocks surface |
mustlock() | β | Always returns False |
get_locked() | β | Returns lock status |
get_locks() | β | Returns lock tuple |
get_at(pos) | β | Gets pixel Color |
set_at(pos, color) | β | Sets pixel color |
get_at_mapped(pos) | β | Returns RGBA tuple as int |
get_palette() | β | No palette mode |
get_palette_at(index) | β | No palette mode |
set_palette(palette) | β | No palette mode |
set_palette_at(index, color) | β | No palette mode |
map_rgb(color) | β | Maps color to pixel value |
unmap_rgb(mapped_int) | β | Unmaps pixel to Color |
set_clip(rect) | β | Sets clipping rectangle |
get_clip() | β | Gets clipping rectangle |
subsurface(rect) | β | Creates subsurface view |
get_parent() | β | Returns parent surface |
get_abs_parent() | β | Returns root parent |
get_offset() | β | Returns subsurface offset |
get_abs_offset() | β | Returns absolute offset |
get_size() | β | Returns (width, height) |
get_width() | β | Returns width |
get_height() | β | Returns height |
get_rect(**kwargs) | β | Returns Rect with size |
get_frect(**kwargs) | β | Returns FRect with size |
get_bitsize() | β | Returns 32 |
get_bytesize() | β | Returns 4 |
get_flags() | β | Returns surface flags |
get_pitch() | β | Returns bytes per row |
get_masks() | β | Returns RGBA masks |
get_shifts() | β | Returns RGBA shifts |
get_losses() | β | Returns (0,0,0,0) |
get_bounding_rect(min_alpha) | β | Returns bounding rect of non-transparent pixels |
get_view(kind) | β | Buffer view access |
get_buffer() | β | Raw buffer access |
_pixels_address | β | Memory address (not applicable) |
premul_alpha() | β | Premultiplied alpha conversion |
blit_array(array, dest) | β | Array blitting |
Surface.blit() | β | |
Surface.blits() | β | |
Surface.convert() | β | |
Surface.convert_alpha() | β | |
Surface.copy() | β | |
Surface.fblits() | β | |
Surface.fill() | β | |
Surface.get_alpha() | β | |
Surface.get_at() | β | |
Surface.get_at_mapped() | β | |
Surface.get_bitsize() | β | |
Surface.get_bounding_rect() | β | |
Surface.get_buffer() | β | |
Surface.get_bytesize() | β | |
Surface.get_clip() | β | |
Surface.get_colorkey() | β | |
Surface.get_flags() | β | |
Surface.get_frect() | β | |
Surface.get_height() | β | |
Surface.get_locked() | β | |
Surface.get_locks() | β | |
Surface.get_losses() | β | |
Surface.get_masks() | β | |
Surface.get_pitch() | β | |
Surface.get_rect() | β | |
Surface.get_shifts() | β | |
Surface.get_size() | β | |
Surface.get_view() | β | |
Surface.get_width() | β | |
Surface.height() | β | |
Surface.lock() | β | |
Surface.map_rgb() | β | |
Surface.mustlock() | β | |
Surface.premul_alpha() | β | |
Surface.premul_alpha_ip() | β | |
Surface.scroll() | β | |
Surface.set_alpha() | β | |
Surface.set_at() | β | |
Surface.set_clip() | β | |
Surface.set_colorkey() | β | |
Surface.size() | β | |
Surface.subsurface() | β | |
Surface.unlock() | β | |
Surface.unmap_rgb() | β | |
Surface.width() | β |
pygame.draw
Section titled βpygame.drawβ| Function | Status | Notes |
|---|---|---|
draw.rect(surface, color, rect, width, border_radius, ...) | β | Draws rectangle with border radius support |
draw.polygon(surface, color, points, width) | β | Draws polygon |
draw.circle(surface, color, center, radius, width, ...) | β | Draws circle |
draw.ellipse(surface, color, rect, width) | β | Draws ellipse |
draw.arc(surface, color, rect, start_angle, stop_angle, width) | β | Draws arc |
draw.line(surface, color, start_pos, end_pos, width) | β | Draws line |
draw.lines(surface, color, closed, points, width) | β | Draws connected lines |
draw.aaline(surface, color, start_pos, end_pos, blend) | β | Anti-aliased line |
draw.aalines(surface, color, closed, points, blend) | β | Anti-aliased lines |
pygame.event
Section titled βpygame.eventβ| Function | Status | Notes |
|---|---|---|
Event(type, dict, **kwargs) | β | Event object with type and attributes |
event.pump() | β | No-op (events arrive via callbacks) |
event.get(eventtype, pump, exclude) | β | Get and remove events |
event.poll() | β | Get single event or NOEVENT |
event.wait(timeout) | β | Wait for event (polls in Jupyter) |
event.peek(eventtype, pump) | β | Check for events without removing |
event.clear(eventtype, pump) | β | Remove events from queue |
event.event_name(type) | β | Get event name string |
event.set_blocked(type) | β | Block event types |
event.set_allowed(type) | β | Allow event types |
event.get_blocked(type) | β | Check if event type blocked |
event.set_grab(grab) | β | Set input grab state |
event.get_grab() | β | Get input grab state |
event.post(event) | β | Post event to queue |
event.custom_type() | β | Get unique event type ID |
event.set_keyboard_grab(grab) | β | Keyboard grab control |
event.get_keyboard_grab() | β | Get keyboard grab state |
pygame.key
Section titled βpygame.keyβ| Function | Status | Notes |
|---|---|---|
key.get_focused() | β | Returns True (canvas focus assumed) |
key.get_pressed() | β | Returns ScancodeWrapper of key states |
key.get_just_pressed() | β | Returns keys pressed this frame |
key.get_just_released() | β | Returns keys released this frame |
key.get_mods() | β | Returns modifier key bitmask |
key.set_mods(mods) | β | Sets modifier state |
key.set_repeat(delay, interval) | β | Sets key repeat |
key.get_repeat() | β | Gets key repeat settings |
key.name(key) | β | Get key name string |
key.key_code(name) | β | Get key constant from name |
key.start_text_input() | β | Enable text input (stored state) |
key.stop_text_input() | β | Disable text input |
key.set_text_input_rect(rect) | β | Stored but no IME positioning |
ScancodeWrapper() | β |
pygame.mouse
Section titled βpygame.mouseβ| Function | Status | Notes |
|---|---|---|
mouse.get_pressed(num_buttons, desktop) | β | Returns button states |
mouse.get_just_pressed() | β | Buttons pressed this frame |
mouse.get_just_released() | β | Buttons released this frame |
mouse.get_pos() | β | Returns mouse position |
mouse.get_rel() | β | Returns relative movement |
mouse.set_pos(pos) | β | Stores position (canβt move cursor in browser) |
mouse.set_visible(bool) | β | Stores state (limited browser control) |
mouse.get_visible() | β | Returns visibility state |
mouse.get_focused() | β | Returns True (assumes focus) |
mouse.set_cursor(cursor) | β | Stored but limited browser control |
mouse.get_cursor() | β | Returns current cursor |
mouse.set_relative_mode(bool) | β | Stores state (limited in browser) |
mouse.get_relative_mode() | β | Returns relative mode state |
Cursor() | β |
pygame.time
Section titled βpygame.timeβ| Function | Status | Notes |
|---|---|---|
time.get_ticks() | β | Milliseconds since init() |
time.wait(milliseconds) | β | Pause using time.sleep() |
time.delay(milliseconds) | β | Accurate delay (same as wait in ipygame) |
time.set_timer(event, millis, loops) | β | Post events periodically using threading |
Clock() | β | Clock class |
Clock.tick(framerate) | β | Update clock with frame limiting |
Clock.tick_busy_loop(framerate) | β | Accurate tick with busy wait |
Clock.get_time() | β | Time of previous tick |
Clock.get_rawtime() | β | Raw time without delay |
Clock.get_fps() | β | Calculate framerate |
pygame.font
Section titled βpygame.fontβ| Function | Status | Notes |
|---|---|---|
font.init() | β | Initialize font module |
font.quit() | β | Uninitialize font module |
font.get_init() | β | Get init status |
font.get_default_font() | β | Returns βfreesansbold.ttfβ |
font.get_fonts() | β | List system fonts |
font.match_font(name, bold, italic) | β | Find system font file |
font.SysFont(name, size, bold, italic) | β | Create system font |
Font(filename, size) | β | Create Font from file |
Font.render(text, antialias, color, background) | β | Render text to surface using Pillow |
Font.size(text) | β | Get rendered text dimensions |
Font.set_underline(bool) | β | Enable/disable underline |
Font.get_underline() | β | Get underline state |
Font.set_bold(bool) | β | Enable/disable bold |
Font.get_bold() | β | Get bold state |
Font.set_italic(bool) | β | Enable/disable italic |
Font.get_italic() | β | Get italic state |
Font.metrics(text) | β | Character metrics |
Font.get_linesize() | β | Line spacing |
Font.get_height() | β | Font height |
Font.get_ascent() | β | Ascent metric |
Font.get_descent() | β | Descent metric |
font.get_sdl_ttf_version() | β | Returns (0,0,0) |
pygame.image
Section titled βpygame.imageβ| Function | Status | Notes |
|---|---|---|
image.load(file, namehint) | β | Load image using Pillow |
image.save(surface, file, namehint) | β | Save image using Pillow |
image.get_extended() | β | Returns True (Pillow supports extended formats) |
image.tostring(surface, format, flipped) | β | Surface to bytes (deprecated) |
image.tobytes(surface, format, flipped) | β | Surface to bytes |
image.fromstring(bytes, size, format, flipped) | β | Bytes to surface (deprecated) |
image.frombytes(bytes, size, format, flipped) | β | Bytes to surface |
image.frombuffer(buffer, size, format) | β | Buffer to surface |
image.load_basic(file) | β | Load basic formats |
image.load_extended(file, namehint) | β | Load extended formats |
image.save_extended(surface, file, namehint) | β | Save extended formats |
image.load_sized_svg(file, size) | β | Stub raises NotImplementedError |
image.get_sdl_image_version() | β |
pygame.transform
Section titled βpygame.transformβ| Function | Status | Notes |
|---|---|---|
transform.flip(surface, flip_x, flip_y) | β | Flip surface |
transform.scale(surface, size, dest_surface) | β | Scale using Pillow |
transform.scale_by(surface, factor, dest_surface) | β | Scale by factor |
transform.rotate(surface, angle) | β | Rotate using Pillow |
transform.rotozoom(surface, angle, scale) | β | Combined rotate and zoom |
transform.scale2x(surface, dest_surface) | β | 2x scale (uses Pillow) |
transform.smoothscale(surface, size, dest_surface) | β | Smooth scale using Pillow |
transform.smoothscale_by(surface, factor, dest_surface) | β | Smooth scale by factor |
transform.get_smoothscale_backend() | β | Returns βGENERICβ |
transform.set_smoothscale_backend(backend) | β | No-op (always Pillow) |
transform.chop(surface, rect) | β | Extract region |
transform.laplacian(surface, dest_surface) | β | Edge detection filter |
transform.average_surfaces(surfaces, dest_surface, palette_colors) | β | Average multiple surfaces |
transform.average_color(surface, rect, consider_alpha) | β | Average color in region |
transform.threshold(...) | β | Color threshold operation |
transform.grayscale(surface, dest_surface) | β | Convert to grayscale |
transform.invert(surface, dest_surface) | β | Invert colors |
transform.box_blur(surface, radius, repeat_edge_pixels, dest_surface) | β | Box blur filter |
transform.gaussian_blur(surface, radius, repeat_edge_pixels, dest_surface) | β | Gaussian blur |
transform.hsl(surface, hue_adjust, sat_adjust, light_adjust) | β | HSL color adjustment |
transform.pixelate(surface, size, dest_surface) | β | Pixelate effect |
transform.solid_overlay(surface, color, dest_surface) | β | Solid color overlay |
pygame.sprite
Section titled βpygame.spriteβ| Class/Function | Status | Notes |
|---|---|---|
Sprite(*groups) | β | Basic sprite class |
Sprite.image | β | Surface attribute |
Sprite.rect | β | Rect attribute |
Sprite.add(*groups) | β | Add to groups |
Sprite.remove(*groups) | β | Remove from groups |
Sprite.kill() | β | Remove from all groups |
Sprite.alive() | β | Check if in any group |
Sprite.groups() | β | List of containing groups |
Sprite.update(*args, **kwargs) | β | Update method (override) |
DirtySprite | β | Dirty rect optimization |
Group(*sprites) | β | Basic sprite group |
Group.sprites() | β | List of sprites |
Group.copy() | β | Copy group |
Group.add(*sprites) | β | Add sprites |
Group.remove(*sprites) | β | Remove sprites |
Group.has(*sprites) | β | Check membership |
Group.update(*args, **kwargs) | β | Update all sprites |
Group.draw(surface) | β | Draw all sprites |
Group.clear(surface, bgd) | β | Clear sprites |
Group.empty() | β | Remove all sprites |
GroupSingle(sprite) | β | Group holding single sprite |
RenderPlain | β | Alias for Group |
RenderClear | β | Render with clear |
RenderUpdates | β | Group tracking dirty rects |
OrderedUpdates | β | Ordered sprite group |
LayeredUpdates | β | Layered sprite group |
LayeredDirty | β | Layered with dirty rects |
spritecollide(sprite, group, dokill, collided) | β | Sprite-group collision |
collide_rect(left, right) | β | Rectangle collision |
collide_rect_ratio(ratio) | β | Scaled rect collision |
collide_circle(left, right) | β | Circle collision |
collide_circle_ratio(ratio) | β | Scaled circle collision |
collide_mask(left, right) | β | Mask collision |
groupcollide(group1, group2, dokill1, dokill2, collided) | β | Group-group collision |
spritecollideany(sprite, group, collided) | β | Check any collision |
sprite.groupcollide() | β | |
sprite.spritecollide() | β | |
sprite.spritecollideany() | β |
pygame.Rect / FRect
Section titled βpygame.Rect / FRectβ| Method/Property | Status | Notes |
|---|---|---|
Rect(left, top, width, height) | β | Integer rect |
FRect(left, top, width, height) | β | Float rect |
x, y, w, h, width, height | β | Basic properties |
top, left, bottom, right | β | Edge properties |
topleft, topright, bottomleft, bottomright | β | Corner properties |
midtop, midleft, midbottom, midright | β | Mid-edge properties |
center, centerx, centery | β | Center properties |
size | β | (w, h) tuple |
copy() | β | Copy rect |
move(x, y) | β | Move rect |
move_ip(x, y) | β | Move in-place |
inflate(x, y) | β | Grow/shrink rect |
inflate_ip(x, y) | β | Grow/shrink in-place |
update(left, top, width, height) | β | Update values |
clamp(rect) | β | Clamp inside rect |
clamp_ip(rect) | β | Clamp in-place |
clip(rect) | β | Intersection |
clipline(x1, y1, x2, y2) | β | Clip line to rect |
union(rect) | β | Bounding union |
union_ip(rect) | β | Union in-place |
unionall(rect_list) | β | Union of multiple rects |
unionall_ip(rect_list) | β | Union all in-place |
fit(rect) | β | Fit inside rect |
normalize() | β | Ensure positive w, h |
contains(rect) | β | Check containment |
collidepoint(x, y) | β | Point collision |
colliderect(rect) | β | Rect collision |
collidelist(list) | β | Test against list |
collidelistall(list) | β | All collisions in list |
collidedict(dict) | β | Dict collision test |
collidedictall(dict) | β | All dict collisions |
collideobjectsall(objects) | β | Collision with objects |
collideobjects(objects) | β | First collision with objects |
FRect.bottom() | β | |
FRect.bottomleft() | β | |
FRect.bottomright() | β | |
FRect.center() | β | |
FRect.centerx() | β | |
FRect.centery() | β | |
FRect.clamp() | β | |
FRect.clamp_ip() | β | |
FRect.clip() | β | |
FRect.collidelist() | β | |
FRect.collidelistall() | β | |
FRect.collidepoint() | β | |
FRect.colliderect() | β | |
FRect.contains() | β | |
FRect.copy() | β | |
FRect.fit() | β | |
FRect.h() | β | |
FRect.height() | β | |
FRect.inflate() | β | |
FRect.inflate_ip() | β | |
FRect.left() | β | |
FRect.midbottom() | β | |
FRect.midleft() | β | |
FRect.midright() | β | |
FRect.midtop() | β | |
FRect.move() | β | |
FRect.move_ip() | β | |
FRect.move_to() | β | |
FRect.normalize() | β | |
FRect.right() | β | |
FRect.scale_by() | β | |
FRect.scale_by_ip() | β | |
FRect.size() | β | |
FRect.top() | β | |
FRect.topleft() | β | |
FRect.topright() | β | |
FRect.union() | β | |
FRect.union_ip() | β | |
FRect.unionall() | β | |
FRect.unionall_ip() | β | |
FRect.update() | β | |
FRect.w() | β | |
FRect.width() | β | |
FRect.x() | β | |
FRect.y() | β | |
Rect.bottom() | β | |
Rect.bottomleft() | β | |
Rect.bottomright() | β | |
Rect.center() | β | |
Rect.centerx() | β | |
Rect.centery() | β | |
Rect.clamp() | β | |
Rect.clamp_ip() | β | |
Rect.clip() | β | |
Rect.clipline() | β | |
Rect.collidedict() | β | |
Rect.collidedictall() | β | |
Rect.collidelist() | β | |
Rect.collidelistall() | β | |
Rect.collideobjects() | β | |
Rect.collideobjectsall() | β | |
Rect.collidepoint() | β | |
Rect.colliderect() | β | |
Rect.contains() | β | |
Rect.copy() | β | |
Rect.fit() | β | |
Rect.h() | β | |
Rect.height() | β | |
Rect.inflate() | β | |
Rect.inflate_ip() | β | |
Rect.left() | β | |
Rect.midbottom() | β | |
Rect.midleft() | β | |
Rect.midright() | β | |
Rect.midtop() | β | |
Rect.move() | β | |
Rect.move_ip() | β | |
Rect.move_to() | β | |
Rect.normalize() | β | |
Rect.right() | β | |
Rect.scale_by() | β | |
Rect.scale_by_ip() | β | |
Rect.size() | β | |
Rect.top() | β | |
Rect.topleft() | β | |
Rect.topright() | β | |
Rect.union() | β | |
Rect.union_ip() | β | |
Rect.unionall() | β | |
Rect.unionall_ip() | β | |
Rect.update() | β | |
Rect.w() | β | |
Rect.width() | β | |
Rect.x() | β | |
Rect.y() | β |
pygame.Color
Section titled βpygame.Colorβ| Method/Property | Status | Notes |
|---|---|---|
Color(mapped_int) | β | Packed integer |
r, g, b, a | β | RGBA properties |
hsva | β | HSV+alpha tuple |
hsla | β | HSL+alpha tuple |
cmy | β | CMY tuple |
i1i2i3 | β | I1I2I3 color space |
normalize() | β | Normalized RGBA |
correct_gamma(gamma) | β | Gamma correction |
set_length(len) | β | Set tuple length |
grayscale() | β | Convert to grayscale |
lerp(color, t) | β | Linear interpolation |
premul_alpha() | β | Premultiply alpha |
update(r, g, b, a) | β | Update values |
Arithmetic operators | β | +, -, *, //, %, ** |
Comparison operators | β | ==, != |
Indexing/iteration | β | color[i], for c in color |
Color.a() | β | |
Color.b() | β | |
Color.cmy() | β | |
Color.correct_gamma() | β | |
Color.from_cmy() | β | |
Color.from_hex() | β | |
Color.from_hsla() | β | |
Color.from_hsva() | β | |
Color.from_i1i2i3() | β | |
Color.from_normalized() | β | |
Color.g() | β | |
Color.grayscale() | β | |
Color.hex() | β | |
Color.hsla() | β | |
Color.hsva() | β | |
Color.i1i2i3() | β | |
Color.lerp() | β | |
Color.normalize() | β | |
Color.normalized() | β | |
Color.premul_alpha() | β | |
Color.r() | β | |
Color.update() | β |
pygame.math
Section titled βpygame.mathβ| Class/Function | Status | Notes |
|---|---|---|
Vector2(x, y) | β | 2D vector |
Vector3(x, y, z) | β | 3D vector |
Vector2.x, Vector2.y | β | Components |
Vector3.x, Vector3.y, Vector3.z | β | Components |
Arithmetic operators | β | +, -, *, /, //, % |
dot(other) | β | Dot product |
cross(other) | β | Cross product (Vector3) |
magnitude() | β | Vector length |
magnitude_squared() | β | Squared length |
length() | β | Alias for magnitude |
length_squared() | β | Alias for magnitude_squared |
normalize() | β | Unit vector |
normalize_ip() | β | Normalize in-place |
is_normalized() | β | Check if unit length |
scale_to_length(length) | β | Scale to specific length |
reflect(normal) | β | Reflect across normal |
reflect_ip(normal) | β | Reflect in-place |
distance_to(other) | β | Distance between vectors |
distance_squared_to(other) | β | Squared distance |
rotate(angle) | β | Rotate vector (Vector2) |
rotate_ip(angle) | β | Rotate in-place (Vector2) |
rotate_rad(angle) | β | Rotate by radians (Vector2) |
rotate_rad_ip(angle) | β | Rotate in-place by radians |
angle_to(other) | β | Angle to other vector |
as_polar() | β | Convert to polar (r, theta) |
from_polar(polar) | β | Create from polar coordinates |
lerp(other, t) | β | Linear interpolation |
slerp(other, t) | β | Spherical interpolation |
smoothstep(other, t) | β | Smooth interpolation |
elementwise() | β | Element-wise operations |
move_towards(target, max_distance) | β | Move toward target |
move_towards_ip(target, max_distance) | β | Move toward in-place |
clamp_magnitude(max_length) | β | Clamp to max length |
clamp_magnitude_ip(max_length) | β | Clamp in-place |
clamp(min, max) | β | Module-level clamp function |
epsilon | β | Comparison epsilon |
copy() | β | Copy vector |
pygame.mask
Section titled βpygame.maskβ| Item | Status | Notes |
|---|---|---|
Function/Method | β | Notes |
Mask(size, fill) | β | Create mask |
from_surface(surface, threshold) | β | Create from surface |
from_threshold(surface, color, threshold, ...) | β | Create from color threshold |
mask.copy() | β | Copy mask |
mask.get_size() | β | Get dimensions |
mask.get_at(pos) | β | Get bit at position |
mask.set_at(pos, value) | β | Set bit at position |
mask.overlap(other, offset) | β | Find overlap position |
mask.overlap_area(other, offset) | β | Count overlapping bits |
mask.overlap_mask(other, offset) | β | Create overlap mask |
mask.fill() | β | Fill with 1s |
mask.clear() | β | Fill with 0s |
mask.invert() | β | Invert bits |
mask.get_rect(**kwargs) | β | Get bounding rect |
mask.count() | β | Count set bits |
mask.centroid() | β | Calculate centroid |
mask.angle() | β | Calculate orientation angle |
mask.outline(every) | β | Get outline points |
mask.convolve(other, output, offset) | β | Convolve masks |
mask.connected_component(pos) | β | Get connected component |
mask.connected_components(minimum) | β | Get all components |
mask.get_bounding_rects() | β | Get all bounding rects |
mask.draw(other, offset) | β | Draw mask onto this |
mask.erase(other, offset) | β | Erase other from this |
mask.scale(size) | β | Scale mask |
mask.to_surface(...) | β | Convert to surface |
mask.from_surface() | β | |
mask.from_threshold() | β |
pygame.gfxdraw
Section titled βpygame.gfxdrawβ| Function | Status | Notes |
|---|---|---|
pixel(surface, x, y, color) | β | Single pixel (uses set_at) |
hline(surface, x1, x2, y, color) | β | Horizontal line |
vline(surface, x, y1, y2, color) | β | Vertical line |
rectangle(surface, rect, color) | β | Rectangle outline |
box(surface, rect, color) | β | Filled rectangle |
line(surface, x1, y1, x2, y2, color) | β | Line |
circle(surface, x, y, r, color) | β | Circle outline |
arc(surface, x, y, r, start, end, color) | β | Arc |
aacircle(surface, x, y, r, color) | β | Anti-aliased circle |
filled_circle(surface, x, y, r, color) | β | Filled circle |
ellipse(surface, x, y, rx, ry, color) | β | Ellipse outline |
aaellipse(surface, x, y, rx, ry, color) | β | Anti-aliased ellipse |
filled_ellipse(surface, x, y, rx, ry, color) | β | Filled ellipse |
pie(surface, x, y, r, start, end, color) | β | Pie slice |
trigon(surface, x1, y1, x2, y2, x3, y3, color) | β | Triangle |
aatrigon(surface, x1, y1, x2, y2, x3, y3, color) | β | AA triangle |
filled_trigon(surface, x1, y1, x2, y2, x3, y3, color) | β | Filled triangle |
polygon(surface, points, color) | β | Polygon outline |
aapolygon(surface, points, color) | β | AA polygon |
filled_polygon(surface, points, color) | β | Filled polygon |
textured_polygon(surface, points, texture, tx, ty) | β | Textured polygon |
bezier(surface, points, steps, color) | β | Bezier curve |
gfxdraw.aacircle() | β | |
gfxdraw.aaellipse() | β | |
gfxdraw.aapolygon() | β | |
gfxdraw.aatrigon() | β | |
gfxdraw.arc() | β | |
gfxdraw.bezier() | β | |
gfxdraw.box() | β | |
gfxdraw.circle() | β | |
gfxdraw.ellipse() | β | |
gfxdraw.filled_circle() | β | |
gfxdraw.filled_ellipse() | β | |
gfxdraw.filled_polygon() | β | |
gfxdraw.filled_trigon() | β | |
gfxdraw.hline() | β | |
gfxdraw.line() | β | |
gfxdraw.pie() | β | |
gfxdraw.pixel() | β | |
gfxdraw.polygon() | β | |
gfxdraw.rectangle() | β | |
gfxdraw.textured_polygon() | β | |
gfxdraw.trigon() | β | |
gfxdraw.vline() | β |
pygame.surfarray
Section titled βpygame.surfarrayβ| Function | Status | Notes |
|---|---|---|
array2d(surface) | β | 2D pixel array (grayscale) |
array3d(surface) | β | 3D RGB array |
pixels2d(surface) | β | 2D view (writable) |
pixels3d(surface) | β | 3D view (writable) |
array_alpha(surface) | β | Alpha channel array |
array_colorkey(surface) | β | Colorkey array |
make_surface(array) | β | Create surface from array |
blit_array(surface, array) | β | Blit array to surface |
map_array(surface, array) | β | Map colors to pixel values |
use_arraytype(arraytype) | β | Set array type (always numpy) |
get_arraytype() | β | Returns βnumpyβ |
get_arraytypes() | β | Returns [βnumpyβ] |
surfarray.array2d() | β | |
surfarray.array3d() | β | |
surfarray.array_alpha() | β | |
surfarray.array_blue() | β | |
surfarray.array_colorkey() | β | |
surfarray.array_green() | β | |
surfarray.array_red() | β | |
surfarray.array_to_surface() | β | |
surfarray.blit_array() | β | |
surfarray.make_surface() | β | |
surfarray.map_array() | β | |
surfarray.pixels2d() | β | |
surfarray.pixels3d() | β | |
surfarray.pixels_alpha() | β | |
surfarray.pixels_blue() | β | |
surfarray.pixels_green() | β | |
surfarray.pixels_red() | β | |
surfarray.surface_to_array() | β |
pygame.pixelcopy
Section titled βpygame.pixelcopyβ| Function | Status | Notes |
|---|---|---|
surface_to_array(array, surface, kind, opaque, ...) | β | Fast surface to array copy |
array_to_surface(surface, array) | β | Fast array to surface copy |
map_array(surface, array3d, array2d) | β | Map RGB to pixel values |
make_surface(array) | β | Create surface from array |
pixelcopy.array_to_surface() | β | |
pixelcopy.make_surface() | β | |
pixelcopy.map_array() | β | |
pixelcopy.surface_to_array() | β |
pygame.mixer
Section titled βpygame.mixerβ| Item | Status | Notes |
|---|---|---|
Function/Class | β | Notes |
mixer.init(...) | π« | Audio initialization |
mixer.pre_init(...) | π« | Pre-initialize mixer |
mixer.quit() | π« | Uninitialize mixer |
mixer.get_init() | π« | Get audio settings |
mixer.stop() | π« | Stop all channels |
mixer.pause() | π« | Pause all channels |
mixer.unpause() | π« | Unpause all channels |
mixer.fadeout(time) | π« | Fade out all sounds |
mixer.set_num_channels(count) | π« | Set channel count |
mixer.get_num_channels() | π« | Get channel count |
mixer.set_reserved(count) | π« | Reserve channels |
mixer.find_channel(force) | π« | Find available channel |
mixer.get_busy() | π« | Check if any sound playing |
Sound(file) | π« | Sound object |
Sound.play(loops, maxtime, fade_ms) | π« | Play sound |
Sound.stop() | π« | Stop sound |
Sound.fadeout(time) | π« | Fade out sound |
Sound.set_volume(value) | π« | Set volume |
Sound.get_volume() | π« | Get volume |
Sound.get_num_channels() | π« | Active channels |
Sound.get_length() | π« | Sound duration |
Channel(id) | π« | Channel object |
Channel.play(sound, ...) | π« | Play on channel |
Channel.stop() | π« | Stop channel |
Channel.pause() | π« | Pause channel |
Channel.unpause() | π« | Unpause channel |
Channel.fadeout(time) | π« | Fade out channel |
Channel.set_volume(left, right) | π« | Set channel volume |
Channel.get_volume() | π« | Get channel volume |
Channel.get_busy() | π« | Check if playing |
Channel.get_sound() | π« | Get current sound |
Channel.queue(sound) | π« | Queue sound |
Channel.get_queue() | π« | Get queued sound |
pygame.mixer.music
Section titled βpygame.mixer.musicβ| Function | Status | Notes |
|---|---|---|
music.load(file) | π« | Load music file |
music.unload() | π« | Unload music |
music.play(loops, start, fade_ms) | π« | Play music |
music.rewind() | π« | Restart music |
music.stop() | π« | Stop music |
music.pause() | π« | Pause music |
music.unpause() | π« | Unpause music |
music.fadeout(time) | π« | Fade out music |
music.set_volume(volume) | π« | Set volume |
music.get_volume() | π« | Get volume |
music.get_busy() | π« | Check if playing |
music.set_pos(pos) | π« | Set position |
music.get_pos() | π« | Get position |
music.queue(file) | π« | Queue next music |
music.set_endevent(type) | π« | Set end event |
music.get_endevent() | π« | Get end event |
pygame.joystick
Section titled βpygame.joystickβ| Item | Status | Notes |
|---|---|---|
Function/Method | β | Notes |
joystick.init() | π« | Initialize joystick |
joystick.quit() | π« | Uninitialize joystick |
joystick.get_init() | π« | Get init status |
joystick.get_count() | π« | Number of joysticks |
Joystick(id) | π« | Joystick object |
Joystick.init() | π« | Initialize stick |
Joystick.quit() | π« | Uninitialize stick |
Joystick.get_init() | π« | Get init status |
Joystick.get_id() | π« | Get joystick ID |
Joystick.get_instance_id() | π« | Get instance ID |
Joystick.get_guid() | π« | Get GUID |
Joystick.get_power_level() | π« | Get battery level |
Joystick.get_name() | π« | Get joystick name |
Joystick.get_numaxes() | π« | Number of axes |
Joystick.get_axis(axis) | π« | Get axis value |
Joystick.get_numballs() | π« | Number of trackballs |
Joystick.get_ball(ball) | π« | Get ball movement |
Joystick.get_numbuttons() | π« | Number of buttons |
Joystick.get_button(button) | π« | Get button state |
Joystick.get_numhats() | π« | Number of hats |
Joystick.get_hat(hat) | π« | Get hat position |
Joystick.rumble(low, high, duration) | π« | Rumble effect |
Joystick.stop_rumble() | π« | Stop rumble |
pygame.camera
Section titled βpygame.cameraβ| Item | Status | Notes |
|---|---|---|
Function/Class | β | Notes |
camera.init() | β | Raises NotImplementedError |
camera.get_backends() | β | Raises NotImplementedError |
camera.colorspace(surface, format, dest_surface) | β | Raises NotImplementedError |
camera.list_cameras() | β | Raises NotImplementedError |
Camera(device, size, format) | β | Raises NotImplementedError |
Camera.start() | β | Raises NotImplementedError |
Camera.stop() | β | Raises NotImplementedError |
Camera.get_controls() | β | Raises NotImplementedError |
Camera.set_controls() | β | Raises NotImplementedError |
Camera.get_size() | β | Raises NotImplementedError |
Camera.query_image() | β | Raises NotImplementedError |
Camera.get_image(surface) | β | Raises NotImplementedError |
Camera.get_raw() | β | Raises NotImplementedError |
pygame.freetype
Section titled βpygame.freetypeβ| Item | Status | Notes |
|---|---|---|
Function/Class | β | Notes |
freetype.init() | β | Stub raises NotImplementedError |
freetype.quit() | β | Stub raises NotImplementedError |
freetype.get_init() | β | Stub raises NotImplementedError |
freetype.get_default_font() | β | Stub raises NotImplementedError |
freetype.get_default_resolution() | β | Stub raises NotImplementedError |
freetype.set_default_resolution(dpi) | β | Stub raises NotImplementedError |
freetype.SysFont(name, size, bold, italic) | β | Stub raises NotImplementedError |
Font(file, size, ...) | β | Stub raises NotImplementedError |
freetype.get_version() | β | |
freetype.was_init() | β |
pygame.cursors
Section titled βpygame.cursorsβ| Item | Status | Notes |
|---|---|---|
Function/Class | β | Notes |
cursors.compile(strings, black, white, xor) | β | Stub |
cursors.load_xbm(cursorfile, maskfile) | β | Stub |
Cursor(constant) | β | System cursor constant |
Cursor constants | β | SYSTEM_CURSOR_* constants |
pygame.midi
Section titled βpygame.midiβ| Item | Status | Notes |
|---|---|---|
Function/Class | β | Notes |
midi.init() | β | Stub raises NotImplementedError |
midi.quit() | β | Stub raises NotImplementedError |
midi.get_init() | β | Stub raises NotImplementedError |
midi.get_count() | β | Stub raises NotImplementedError |
midi.get_default_input_id() | β | Stub raises NotImplementedError |
midi.get_default_output_id() | β | Stub raises NotImplementedError |
midi.get_device_info(device_id) | β | Stub raises NotImplementedError |
midi.midis2events(midi_events, device_id) | β | Stub raises NotImplementedError |
midi.time() | β | Stub raises NotImplementedError |
midi.frequency_to_midi(freq) | β | Stub raises NotImplementedError |
midi.midi_to_frequency(midi_note) | β | Stub raises NotImplementedError |
midi.midi_to_ansi_note(midi_note) | β | Stub raises NotImplementedError |
Input(device_id, buffer_size) | β | Stub raises NotImplementedError |
Output(device_id, latency, buffer_size) | β | Stub raises NotImplementedError |
pygame.sndarray
Section titled βpygame.sndarrayβ| Function | Status | Notes |
|---|---|---|
sndarray.array(sound) | β | Stub raises NotImplementedError |
sndarray.samples(sound) | β | Stub raises NotImplementedError |
sndarray.make_sound(array) | β | Stub raises NotImplementedError |
sndarray.use_arraytype(arraytype) | β | Stub raises NotImplementedError |
sndarray.get_arraytype() | β | Stub raises NotImplementedError |
sndarray.get_arraytypes() | β | Stub raises NotImplementedError |
pygame.scrap
Section titled βpygame.scrapβ| Function | Status | Notes |
|---|---|---|
scrap.init() | β | Not present |
scrap.quit() | β | Not present |
scrap.get_init() | β | Not present |
scrap.get(type) | β | Not present |
scrap.put(type, data) | β | Not present |
scrap.contains(type) | β | Not present |
scrap.lost() | β | Not present |
scrap.set_mode(mode) | β | Not present |
pygame.Window
Section titled βpygame.Windowβ| Method | Status | Notes |
|---|---|---|
Window(title, size, ...) | β | Window management class |
Window.from_display_module() | β | Get window from display |
Window.grab_keyboard() | β | Keyboard grab |
Window.release_keyboard() | β | Release keyboard |
Window.set_windowed() | β | Windowed mode |
Window.set_fullscreen(desktop) | β | Fullscreen mode |
Window.get_surface() | β | Get window surface |
Window.flip() | β | Flip window |
Window.destroy() | β | Destroy window |
Window.hide() | β | Hide window |
Window.show() | β | Show window |
Window.focus() | β | Focus window |
Window.restore() | β | Restore window |
Window.maximize() | β | Maximize window |
Window.minimize() | β | Minimize window |
Window.set_title(title) | β | Set title |
Window.title | β | Window title property |
Window.set_icon(surface) | β | Set icon |
Window.size | β | Window size property |
Window.position | β | Window position property |
Window.opacity | β | Window opacity property |
Window.resizable | β | Resizable property |
Window.borderless | β | Borderless property |
pygame.geometry
Section titled βpygame.geometryβ| Class/Method | Status | Notes |
|---|---|---|
Circle(x, y, r) | β | Circle class |
Circle.x, Circle.y, Circle.r | β | Properties |
Circle.center | β | Center point |
Circle.r_sqr | β | Radius squared |
Circle.area | β | Calculate area |
Circle.circumference | β | Calculate circumference |
Circle.rotate(angle) | β | Rotate around point |
Circle.rotate_ip(angle) | β | Rotate in-place |
Circle.update(x, y, r) | β | Update values |
Circle.move(x, y) | β | Move circle |
Circle.move_ip(x, y) | β | Move in-place |
Circle.collidepoint(x, y) | β | Point collision |
Circle.colliderect(rect) | β | Rect collision |
Circle.collidecircle(circle) | β | Circle collision |
Circle.intersect(circle) | β | Circle intersection |
Circle.as_rect() | β | Bounding rect |
Circle.as_frect() | β | Bounding frect |
Line(x1, y1, x2, y2) | β | Line segment class |
Line.a, Line.b | β | Endpoint properties |
Line.update(x1, y1, x2, y2) | β | Update endpoints |
Line.move(x, y) | β | Move line |
Line.move_ip(x, y) | β | Move in-place |
Line.flip_ab() | β | Swap endpoints |
Line.flip_ab_ip() | β | Swap in-place |
pygame.system
Section titled βpygame.systemβ| Function | Status | Notes |
|---|---|---|
system.get_cpu_instruction_sets() | β | CPU feature detection |
system.get_total_ram() | β | Total system RAM |
system.get_pref_path(org, app) | β | Get preferences path |
system.get_pref_locales() | β | Get locale preferences |
system.get_power_state() | β | Battery/power info |
Summary Statistics
Section titled βSummary Statisticsβ| Item | Status | Notes |
|---|---|---|
Status | β | Percentage |
β
Fully Implemented | β | 45.2% |
πΆ Partially Implemented | β | 6.9% |
β Not Implemented | β | 24.0% |
π« Not Applicable (Jupyter limitations) | β | 24.0% |
Category | β | Status |
Core (init, quit, error) | β | β Excellent |
Display & Surface | β | β Very Good |
Drawing (draw, gfxdraw) | β | β Excellent |
Events & Input | β | β Good |
Time & Clock | β | β Excellent |
Fonts | β | πΆ Good |
Images & Transform | β | β Excellent |
Sprites & Collision | β | πΆ Good |
Colors & Rects | β | β Excellent |
Math (Vector2/3) | β | πΆ Fair |
Masks | β | πΆ Limited |
Audio (mixer, music, sndarray) | β | π« N/A |
Joystick | β | π« N/A |
Camera | β | π« N/A |
Advanced (Window, geometry, system) | β | β Not Implemented |