# Python API

This is a wrapper around the C API with some syntactic sugar.

The API is still the same as Raylib, so you should still reply on the official Raylib docs, except:

- the function names are in snake_case.

- Some string and pointer conversions are handled automatically.

- There are some helper functions to create structures.

Example program:

    import pyray as pr

    pr.init_window(800, 450, "Hello Pyray")
    pr.set_target_fps(60)

    camera = pr.Camera3D([18.0, 16.0, 18.0], [0.0, 0.0, 0.0], [0.0, 1.0, 0.0], 45.0, 0)
    pr.set_camera_mode(camera, pr.CAMERA_ORBITAL)

    while not pr.window_should_close():
        pr.update_camera(camera)
        pr.begin_drawing()
        pr.clear_background(pr.RAYWHITE)
        pr.begin_mode_3d(camera)
        pr.draw_grid(20, 1.0)
        pr.end_mode_3d()
        pr.draw_text("Hello world", 190, 200, 20, pr.VIOLET)
        pr.end_drawing()
    pr.close_window()

Tip

New in 3.7.0.post9:

You can also now import the functions with no prefix:

    from pyray import *

    init_window(800, 450, "Raylib texture test")
    ...

You don’t need to use the PyRay() class anymore.

See also https://github.com/electronstudio/raylib-python-cffi/blob/master/tests/test_pyray.py

## API reference

class `pyray.``AudioStream`(buffer, sampleRate, sampleSize, channels)

  struct

`pyray.``BLEND_ADDITIVE`

`pyray.``BLEND_ADD_COLORS`

`pyray.``BLEND_ALPHA`

`pyray.``BLEND_CUSTOM`

`pyray.``BLEND_MULTIPLIED`

`pyray.``BLEND_SUBTRACT_COLORS`

`pyray.``BlendMode`

class `pyray.``BoneInfo`(name, parent)

  struct

class `pyray.``BoundingBox`(min, max)

  struct

`pyray.``CAMERA_CUSTOM`

`pyray.``CAMERA_FIRST_PERSON`

`pyray.``CAMERA_FREE`

`pyray.``CAMERA_ORBITAL`

`pyray.``CAMERA_ORTHOGRAPHIC`

`pyray.``CAMERA_PERSPECTIVE`

`pyray.``CAMERA_THIRD_PERSON`

`pyray.``CUBEMAP_LAYOUT_AUTO_DETECT`

`pyray.``CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE`

`pyray.``CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR`

`pyray.``CUBEMAP_LAYOUT_LINE_HORIZONTAL`

`pyray.``CUBEMAP_LAYOUT_LINE_VERTICAL`

`pyray.``CUBEMAP_LAYOUT_PANORAMA`

class `pyray.``Camera`(position, target, up, fovy, projection)

  struct

class `pyray.``Camera2D`(offset, target, rotation, zoom)

  struct

class `pyray.``Camera3D`(position, target, up, fovy, projection)

  struct

`pyray.``CameraMode`

`pyray.``CameraProjection`

class `pyray.``CharInfo`(value, offsetX, offsetY, advanceX, image)

  struct

class `pyray.``Color`(r, g, b, a)

  struct

`pyray.``ConfigFlags`

`pyray.``CubemapLayout`

`pyray.``FLAG_FULLSCREEN_MODE`

`pyray.``FLAG_INTERLACED_HINT`

`pyray.``FLAG_MSAA_4X_HINT`

`pyray.``FLAG_VSYNC_HINT`

`pyray.``FLAG_WINDOW_ALWAYS_RUN`

`pyray.``FLAG_WINDOW_HIDDEN`

`pyray.``FLAG_WINDOW_HIGHDPI`

`pyray.``FLAG_WINDOW_MAXIMIZED`

`pyray.``FLAG_WINDOW_MINIMIZED`

`pyray.``FLAG_WINDOW_RESIZABLE`

`pyray.``FLAG_WINDOW_TOPMOST`

`pyray.``FLAG_WINDOW_TRANSPARENT`

`pyray.``FLAG_WINDOW_UNDECORATED`

`pyray.``FLAG_WINDOW_UNFOCUSED`

`pyray.``FONT_BITMAP`

`pyray.``FONT_DEFAULT`

`pyray.``FONT_SDF`

class `pyray.``Font`(baseSize, charsCount, charsPadding, texture, recs, chars)

  struct

`pyray.``FontType`

`pyray.``GAMEPAD_AXIS_LEFT_TRIGGER`

`pyray.``GAMEPAD_AXIS_LEFT_X`

`pyray.``GAMEPAD_AXIS_LEFT_Y`

`pyray.``GAMEPAD_AXIS_RIGHT_TRIGGER`

`pyray.``GAMEPAD_AXIS_RIGHT_X`

`pyray.``GAMEPAD_AXIS_RIGHT_Y`

`pyray.``GAMEPAD_BUTTON_LEFT_FACE_DOWN`

`pyray.``GAMEPAD_BUTTON_LEFT_FACE_LEFT`

`pyray.``GAMEPAD_BUTTON_LEFT_FACE_RIGHT`

`pyray.``GAMEPAD_BUTTON_LEFT_FACE_UP`

`pyray.``GAMEPAD_BUTTON_LEFT_THUMB`

`pyray.``GAMEPAD_BUTTON_LEFT_TRIGGER_1`

`pyray.``GAMEPAD_BUTTON_LEFT_TRIGGER_2`

`pyray.``GAMEPAD_BUTTON_MIDDLE`

`pyray.``GAMEPAD_BUTTON_MIDDLE_LEFT`

`pyray.``GAMEPAD_BUTTON_MIDDLE_RIGHT`

`pyray.``GAMEPAD_BUTTON_RIGHT_FACE_DOWN`

`pyray.``GAMEPAD_BUTTON_RIGHT_FACE_LEFT`

`pyray.``GAMEPAD_BUTTON_RIGHT_FACE_RIGHT`

`pyray.``GAMEPAD_BUTTON_RIGHT_FACE_UP`

`pyray.``GAMEPAD_BUTTON_RIGHT_THUMB`

`pyray.``GAMEPAD_BUTTON_RIGHT_TRIGGER_1`

`pyray.``GAMEPAD_BUTTON_RIGHT_TRIGGER_2`

`pyray.``GAMEPAD_BUTTON_UNKNOWN`

`pyray.``GESTURE_DOUBLETAP`

`pyray.``GESTURE_DRAG`

`pyray.``GESTURE_HOLD`

`pyray.``GESTURE_NONE`

`pyray.``GESTURE_PINCH_IN`

`pyray.``GESTURE_PINCH_OUT`

`pyray.``GESTURE_SWIPE_DOWN`

`pyray.``GESTURE_SWIPE_LEFT`

`pyray.``GESTURE_SWIPE_RIGHT`

`pyray.``GESTURE_SWIPE_UP`

`pyray.``GESTURE_TAP`

`pyray.``GamepadAxis`

`pyray.``GamepadButton`

`pyray.``Gestures`

class `pyray.``Image`(data, width, height, mipmaps, format)

  struct

`pyray.``KEY_A`

`pyray.``KEY_APOSTROPHE`

`pyray.``KEY_B`

`pyray.``KEY_BACK`

`pyray.``KEY_BACKSLASH`

`pyray.``KEY_BACKSPACE`

`pyray.``KEY_C`

`pyray.``KEY_CAPS_LOCK`

`pyray.``KEY_COMMA`

`pyray.``KEY_D`

`pyray.``KEY_DELETE`

`pyray.``KEY_DOWN`

`pyray.``KEY_E`

`pyray.``KEY_EIGHT`

`pyray.``KEY_END`

`pyray.``KEY_ENTER`

`pyray.``KEY_EQUAL`

`pyray.``KEY_ESCAPE`

`pyray.``KEY_F`

`pyray.``KEY_F1`

`pyray.``KEY_F10`

`pyray.``KEY_F11`

`pyray.``KEY_F12`

`pyray.``KEY_F2`

`pyray.``KEY_F3`

`pyray.``KEY_F4`

`pyray.``KEY_F5`

`pyray.``KEY_F6`

`pyray.``KEY_F7`

`pyray.``KEY_F8`

`pyray.``KEY_F9`

`pyray.``KEY_FIVE`

`pyray.``KEY_FOUR`

`pyray.``KEY_G`

`pyray.``KEY_GRAVE`

`pyray.``KEY_H`

`pyray.``KEY_HOME`

`pyray.``KEY_I`

`pyray.``KEY_INSERT`

`pyray.``KEY_J`

`pyray.``KEY_K`

`pyray.``KEY_KB_MENU`

`pyray.``KEY_KP_0`

`pyray.``KEY_KP_1`

`pyray.``KEY_KP_2`

`pyray.``KEY_KP_3`

`pyray.``KEY_KP_4`

`pyray.``KEY_KP_5`

`pyray.``KEY_KP_6`

`pyray.``KEY_KP_7`

`pyray.``KEY_KP_8`

`pyray.``KEY_KP_9`

`pyray.``KEY_KP_ADD`

`pyray.``KEY_KP_DECIMAL`

`pyray.``KEY_KP_DIVIDE`

`pyray.``KEY_KP_ENTER`

`pyray.``KEY_KP_EQUAL`

`pyray.``KEY_KP_MULTIPLY`

`pyray.``KEY_KP_SUBTRACT`

`pyray.``KEY_L`

`pyray.``KEY_LEFT`

`pyray.``KEY_LEFT_ALT`

`pyray.``KEY_LEFT_BRACKET`

`pyray.``KEY_LEFT_CONTROL`

`pyray.``KEY_LEFT_SHIFT`

`pyray.``KEY_LEFT_SUPER`

`pyray.``KEY_M`

`pyray.``KEY_MENU`

`pyray.``KEY_MINUS`

`pyray.``KEY_N`

`pyray.``KEY_NINE`

`pyray.``KEY_NULL`

`pyray.``KEY_NUM_LOCK`

`pyray.``KEY_O`

`pyray.``KEY_ONE`

`pyray.``KEY_P`

`pyray.``KEY_PAGE_DOWN`

`pyray.``KEY_PAGE_UP`

`pyray.``KEY_PAUSE`

`pyray.``KEY_PERIOD`

`pyray.``KEY_PRINT_SCREEN`

`pyray.``KEY_Q`

`pyray.``KEY_R`

`pyray.``KEY_RIGHT`

`pyray.``KEY_RIGHT_ALT`

`pyray.``KEY_RIGHT_BRACKET`

`pyray.``KEY_RIGHT_CONTROL`

`pyray.``KEY_RIGHT_SHIFT`

`pyray.``KEY_RIGHT_SUPER`

`pyray.``KEY_S`

`pyray.``KEY_SCROLL_LOCK`

`pyray.``KEY_SEMICOLON`

`pyray.``KEY_SEVEN`

`pyray.``KEY_SIX`

`pyray.``KEY_SLASH`

`pyray.``KEY_SPACE`

`pyray.``KEY_T`

`pyray.``KEY_TAB`

`pyray.``KEY_THREE`

`pyray.``KEY_TWO`

`pyray.``KEY_U`

`pyray.``KEY_UP`

`pyray.``KEY_V`

`pyray.``KEY_VOLUME_DOWN`

`pyray.``KEY_VOLUME_UP`

`pyray.``KEY_W`

`pyray.``KEY_X`

`pyray.``KEY_Y`

`pyray.``KEY_Z`

`pyray.``KEY_ZERO`

`pyray.``KeyboardKey`

`pyray.``LOG_ALL`

`pyray.``LOG_DEBUG`

`pyray.``LOG_ERROR`

`pyray.``LOG_FATAL`

`pyray.``LOG_INFO`

`pyray.``LOG_NONE`

`pyray.``LOG_TRACE`

`pyray.``LOG_WARNING`

`pyray.``MATERIAL_MAP_ALBEDO`

`pyray.``MATERIAL_MAP_BRDG`

`pyray.``MATERIAL_MAP_CUBEMAP`

`pyray.``MATERIAL_MAP_DIFFUSE`

`pyray.``MATERIAL_MAP_EMISSION`

`pyray.``MATERIAL_MAP_HEIGHT`

`pyray.``MATERIAL_MAP_IRRADIANCE`

`pyray.``MATERIAL_MAP_METALNESS`

`pyray.``MATERIAL_MAP_NORMAL`

`pyray.``MATERIAL_MAP_OCCLUSION`

`pyray.``MATERIAL_MAP_PREFILTER`

`pyray.``MATERIAL_MAP_ROUGHNESS`

`pyray.``MATERIAL_MAP_SPECULAR`

`pyray.``MOUSE_CURSOR_ARROW`

`pyray.``MOUSE_CURSOR_CROSSHAIR`

`pyray.``MOUSE_CURSOR_DEFAULT`

`pyray.``MOUSE_CURSOR_IBEAM`

`pyray.``MOUSE_CURSOR_NOT_ALLOWED`

`pyray.``MOUSE_CURSOR_POINTING_HAND`

`pyray.``MOUSE_CURSOR_RESIZE_ALL`

`pyray.``MOUSE_CURSOR_RESIZE_EW`

`pyray.``MOUSE_CURSOR_RESIZE_NESW`

`pyray.``MOUSE_CURSOR_RESIZE_NS`

`pyray.``MOUSE_CURSOR_RESIZE_NWSE`

`pyray.``MOUSE_LEFT_BUTTON`

`pyray.``MOUSE_MIDDLE_BUTTON`

`pyray.``MOUSE_RIGHT_BUTTON`

class `pyray.``Material`(shader, maps, params)

  struct

class `pyray.``MaterialMap`(texture, color, value)

  struct

`pyray.``MaterialMapIndex`

class `pyray.``Matrix`(m0, m4, m8, m12, m1, m5, m9, m13, m2, m6, m10, m14, m3, m7, m11, m15)

  struct

class `pyray.``Mesh`(vertexCount, triangleCount, vertices, texcoords, texcoords2, normals, tangents, colors, indices, animVertices, animNormals, boneIds, boneWeights, vaoId, vboId)

  struct

class `pyray.``Model`(transform, meshCount, materialCount, meshes, materials, meshMaterial, boneCount, bones, bindPose)

  struct

class `pyray.``ModelAnimation`(boneCount, frameCount, bones, framePoses)

  struct

`pyray.``MouseButton`

`pyray.``MouseCursor`

class `pyray.``Music`(stream, sampleCount, looping, ctxType, ctxData)

  struct

`pyray.``NPATCH_NINE_PATCH`

`pyray.``NPATCH_THREE_PATCH_HORIZONTAL`

`pyray.``NPATCH_THREE_PATCH_VERTICAL`

class `pyray.``NPatchInfo`(source, left, top, right, bottom, layout)

  struct

`pyray.``NPatchLayout`

`pyray.``PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA`

`pyray.``PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA`

`pyray.``PIXELFORMAT_COMPRESSED_DXT1_RGB`

`pyray.``PIXELFORMAT_COMPRESSED_DXT1_RGBA`

`pyray.``PIXELFORMAT_COMPRESSED_DXT3_RGBA`

`pyray.``PIXELFORMAT_COMPRESSED_DXT5_RGBA`

`pyray.``PIXELFORMAT_COMPRESSED_ETC1_RGB`

`pyray.``PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA`

`pyray.``PIXELFORMAT_COMPRESSED_ETC2_RGB`

`pyray.``PIXELFORMAT_COMPRESSED_PVRT_RGB`

`pyray.``PIXELFORMAT_COMPRESSED_PVRT_RGBA`

`pyray.``PIXELFORMAT_UNCOMPRESSED_GRAYSCALE`

`pyray.``PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA`

`pyray.``PIXELFORMAT_UNCOMPRESSED_R32`

`pyray.``PIXELFORMAT_UNCOMPRESSED_R32G32B32`

`pyray.``PIXELFORMAT_UNCOMPRESSED_R32G32B32A32`

`pyray.``PIXELFORMAT_UNCOMPRESSED_R4G4B4A4`

`pyray.``PIXELFORMAT_UNCOMPRESSED_R5G5B5A1`

`pyray.``PIXELFORMAT_UNCOMPRESSED_R5G6B5`

`pyray.``PIXELFORMAT_UNCOMPRESSED_R8G8B8`

`pyray.``PIXELFORMAT_UNCOMPRESSED_R8G8B8A8`

`pyray.``PixelFormat`

class `pyray.``Quaternion`(x, y, z, w)

  struct

class `pyray.``Ray`(position, direction)

  struct

class `pyray.``RayHitInfo`(hit, distance, position, normal)

  struct

class `pyray.``Rectangle`(x, y, width, height)

  struct

class `pyray.``RenderTexture`(id, texture, depth)

  struct

class `pyray.``RenderTexture2D`(id, texture, depth)

  struct

`pyray.``SHADER_LOC_COLOR_AMBIENT`

`pyray.``SHADER_LOC_COLOR_DIFFUSE`

`pyray.``SHADER_LOC_COLOR_SPECULAR`

`pyray.``SHADER_LOC_MAP_ALBEDO`

`pyray.``SHADER_LOC_MAP_BRDF`

`pyray.``SHADER_LOC_MAP_CUBEMAP`

`pyray.``SHADER_LOC_MAP_DIFFUSE`

`pyray.``SHADER_LOC_MAP_EMISSION`

`pyray.``SHADER_LOC_MAP_HEIGHT`

`pyray.``SHADER_LOC_MAP_IRRADIANCE`

`pyray.``SHADER_LOC_MAP_METALNESS`

`pyray.``SHADER_LOC_MAP_NORMAL`

`pyray.``SHADER_LOC_MAP_OCCLUSION`

`pyray.``SHADER_LOC_MAP_PREFILTER`

`pyray.``SHADER_LOC_MAP_ROUGHNESS`

`pyray.``SHADER_LOC_MAP_SPECULAR`

`pyray.``SHADER_LOC_MATRIX_MODEL`

`pyray.``SHADER_LOC_MATRIX_MVP`

`pyray.``SHADER_LOC_MATRIX_NORMAL`

`pyray.``SHADER_LOC_MATRIX_PROJECTION`

`pyray.``SHADER_LOC_MATRIX_VIEW`

`pyray.``SHADER_LOC_VECTOR_VIEW`

`pyray.``SHADER_LOC_VERTEX_COLOR`

`pyray.``SHADER_LOC_VERTEX_NORMAL`

`pyray.``SHADER_LOC_VERTEX_POSITION`

`pyray.``SHADER_LOC_VERTEX_TANGENT`

`pyray.``SHADER_LOC_VERTEX_TEXCOORD01`

`pyray.``SHADER_LOC_VERTEX_TEXCOORD02`

`pyray.``SHADER_UNIFORM_FLOAT`

`pyray.``SHADER_UNIFORM_INT`

`pyray.``SHADER_UNIFORM_IVEC2`

`pyray.``SHADER_UNIFORM_IVEC3`

`pyray.``SHADER_UNIFORM_IVEC4`

`pyray.``SHADER_UNIFORM_SAMPLER2D`

`pyray.``SHADER_UNIFORM_VEC2`

`pyray.``SHADER_UNIFORM_VEC3`

`pyray.``SHADER_UNIFORM_VEC4`

class `pyray.``Shader`(id, locs)

  struct

`pyray.``ShaderLocationIndex`

`pyray.``ShaderUniformDataType`

class `pyray.``Sound`(stream, sampleCount)

  struct

`pyray.``TEXTURE_FILTER_ANISOTROPIC_16X`

`pyray.``TEXTURE_FILTER_ANISOTROPIC_4X`

`pyray.``TEXTURE_FILTER_ANISOTROPIC_8X`

`pyray.``TEXTURE_FILTER_BILINEAR`

`pyray.``TEXTURE_FILTER_POINT`

`pyray.``TEXTURE_FILTER_TRILINEAR`

`pyray.``TEXTURE_WRAP_CLAMP`

`pyray.``TEXTURE_WRAP_MIRROR_CLAMP`

`pyray.``TEXTURE_WRAP_MIRROR_REPEAT`

`pyray.``TEXTURE_WRAP_REPEAT`

class `pyray.``Texture`(id, width, height, mipmaps, format)

  struct

class `pyray.``Texture2D`(id, width, height, mipmaps, format)

  struct

class `pyray.``TextureCubemap`(id, width, height, mipmaps, format)

  struct

`pyray.``TextureFilter`

`pyray.``TextureWrap`

`pyray.``TraceLogLevel`

class `pyray.``Transform`(translation, rotation, scale)

  struct

class `pyray.``Vector2`(x, y)

  struct

class `pyray.``Vector3`(x, y, z)

  struct

class `pyray.``Vector4`(x, y, z, w)

  struct

class `pyray.``VrDeviceInfo`(hResolution, vResolution, hScreenSize, vScreenSize, vScreenCenter, eyeToScreenDistance, lensSeparationDistance, interpupillaryDistance, lensDistortionValues, chromaAbCorrection)

  struct

class `pyray.``VrStereoConfig`(projection, viewOffset, leftLensCenter, rightLensCenter, leftScreenCenter, rightScreenCenter, scale, scaleIn)

  struct

class `pyray.``Wave`(sampleCount, sampleRate, sampleSize, channels, data)

  struct

`pyray.``begin_blend_mode`(mode: int)

  Begin blending mode (alpha, additive, multiplied, subtract, custom)

`pyray.``begin_drawing`()

  Setup canvas (framebuffer) to start drawing

`pyray.``begin_mode_2d`(camera: Camera2D)

  Begin 2D mode with custom camera (2D)

`pyray.``begin_mode_3d`(camera: Camera3D)

  Begin 3D mode with custom camera (3D)

`pyray.``begin_scissor_mode`(x: int, y: int, width: int, height: int)

  Begin scissor mode (define screen area for following drawing)

`pyray.``begin_shader_mode`(shader: Shader)

  Begin custom shader drawing

`pyray.``begin_texture_mode`(target: RenderTexture)

  Begin drawing to render texture

`pyray.``begin_vr_stereo_mode`(config: VrStereoConfig)

  Begin stereo rendering (requires VR simulator)

`pyray.``change_directory`(dir: str)

  Change working directory, return true on success

`pyray.``check_collision_box_sphere`(box: BoundingBox, center: Vector3, radius: float)

  Check collision between box and sphere

`pyray.``check_collision_boxes`(box1: BoundingBox, box2: BoundingBox)

  Check collision between two bounding boxes

`pyray.``check_collision_circle_rec`(center: Vector2, radius: float, rec: Rectangle)

  Check collision between circle and rectangle

`pyray.``check_collision_circles`(center1: Vector2, radius1: float, center2: Vector2, radius2: float)

  Check collision between two circles

`pyray.``check_collision_lines`(startPos1: Vector2, endPos1: Vector2, startPos2: Vector2, endPos2: Vector2, collisionPoint: Any)

  Check the collision between two lines defined by two points each, returns collision point by reference

`pyray.``check_collision_point_circle`(point: Vector2, center: Vector2, radius: float)

  Check if point is inside circle

`pyray.``check_collision_point_rec`(point: Vector2, rec: Rectangle)

  Check if point is inside rectangle

`pyray.``check_collision_point_triangle`(point: Vector2, p1: Vector2, p2: Vector2, p3: Vector2)

  Check if point is inside a triangle

`pyray.``check_collision_ray_box`(Ray_0: Ray, BoundingBox_1: BoundingBox)

  _Bool CheckCollisionRayBox(struct Ray, struct BoundingBox);

  CFFI C function from raylib._raylib_cffi.lib

`pyray.``check_collision_ray_sphere`(Ray_0: Ray, Vector3_1: Vector3, float_2: float)

  _Bool CheckCollisionRaySphere(struct Ray, struct Vector3, float);

  CFFI C function from raylib._raylib_cffi.lib

`pyray.``check_collision_ray_sphere_ex`(Ray_0: Ray, Vector3_1: Vector3, float_2: float, Vector3_pointer_3: Any)

  _Bool CheckCollisionRaySphereEx(struct Ray, struct Vector3, float, struct Vector3 *);

  CFFI C function from raylib._raylib_cffi.lib

`pyray.``check_collision_recs`(rec1: Rectangle, rec2: Rectangle)

  Check collision between two rectangles

`pyray.``check_collision_spheres`(center1: Vector3, radius1: float, center2: Vector3, radius2: float)

  Check collision between two spheres

`pyray.``clear_background`(color: Color)

  Set background color (framebuffer clear color)

`pyray.``clear_directory_files`()

  Clear directory files paths buffers (free memory)

`pyray.``clear_dropped_files`()

  Clear dropped files paths buffer (free memory)

`pyray.``clear_window_state`(flags: int)

  Clear window configuration state flags

`pyray.``close_audio_device`()

  Close the audio device and context

`pyray.``close_audio_stream`(AudioStream_0: AudioStream)

  void CloseAudioStream(struct AudioStream);

  CFFI C function from raylib._raylib_cffi.lib

`pyray.``close_window`()

  Close window and unload OpenGL context

`pyray.``codepoint_to_utf8`(codepoint: int, byteLength: Any)

  Encode codepoint into utf8 text (char array length returned as parameter)

`pyray.``color_alpha`(color: Color, alpha: float)

  Get color with alpha applied, alpha goes from 0.0f to 1.0f

`pyray.``color_alpha_blend`(dst: Color, src: Color, tint: Color)

  Get src alpha-blended into dst color with tint

`pyray.``color_from_hsv`(hue: float, saturation: float, value: float)

  Get a Color from HSV values, hue [0..360], saturation/value [0..1]

`pyray.``color_from_normalized`(normalized: Vector4)

  Get Color from normalized values [0..1]

`pyray.``color_normalize`(color: Color)

  Get Color normalized as float [0..1]

`pyray.``color_to_hsv`(color: Color)

  Get HSV values for a Color, hue [0..360], saturation/value [0..1]

`pyray.``color_to_int`(color: Color)

  Get hexadecimal value for a Color

`pyray.``compress_data`(data: str, dataLength: int, compDataLength: Any)

  Compress data (DEFLATE algorithm)

`pyray.``decompress_data`(compData: str, compDataLength: int, dataLength: Any)

  Decompress data (DEFLATE algorithm)

`pyray.``directory_exists`(dirPath: str)

  Check if a directory path exists

`pyray.``disable_cursor`()

  Disables cursor (lock cursor)

`pyray.``draw_billboard`(camera: Camera3D, texture: Texture, position: Vector3, size: float, tint: Color)

  Draw a billboard texture

`pyray.``draw_billboard_rec`(camera: Camera3D, texture: Texture, source: Rectangle, position: Vector3, size: float, tint: Color)

  Draw a billboard texture defined by source

`pyray.``draw_bounding_box`(box: BoundingBox, color: Color)

  Draw bounding box (wires)

`pyray.``draw_circle`(centerX: int, centerY: int, radius: float, color: Color)

  Draw a color-filled circle

`pyray.``draw_circle_3d`(center: Vector3, radius: float, rotationAxis: Vector3, rotationAngle: float, color: Color)

  Draw a circle in 3D world space

`pyray.``draw_circle_gradient`(centerX: int, centerY: int, radius: float, color1: Color, color2: Color)

  Draw a gradient-filled circle

`pyray.``draw_circle_lines`(centerX: int, centerY: int, radius: float, color: Color)

  Draw circle outline

`pyray.``draw_circle_sector`(center: Vector2, radius: float, startAngle: float, endAngle: float, segments: int, color: Color)

  Draw a piece of a circle

`pyray.``draw_circle_sector_lines`(center: Vector2, radius: float, startAngle: float, endAngle: float, segments: int, color: Color)

  Draw circle sector outline

`pyray.``draw_circle_v`(center: Vector2, radius: float, color: Color)

  Draw a color-filled circle (Vector version)

`pyray.``draw_cube`(position: Vector3, width: float, height: float, length: float, color: Color)

  Draw cube

`pyray.``draw_cube_texture`(texture: Texture, position: Vector3, width: float, height: float, length: float, color: Color)

  Draw cube textured

`pyray.``draw_cube_v`(position: Vector3, size: Vector3, color: Color)

  Draw cube (Vector version)

`pyray.``draw_cube_wires`(position: Vector3, width: float, height: float, length: float, color: Color)

  Draw cube wires

`pyray.``draw_cube_wires_v`(position: Vector3, size: Vector3, color: Color)

  Draw cube wires (Vector version)

`pyray.``draw_cylinder`(position: Vector3, radiusTop: float, radiusBottom: float, height: float, slices: int, color: Color)

  Draw a cylinder/cone

`pyray.``draw_cylinder_wires`(position: Vector3, radiusTop: float, radiusBottom: float, height: float, slices: int, color: Color)

  Draw a cylinder/cone wires

`pyray.``draw_ellipse`(centerX: int, centerY: int, radiusH: float, radiusV: float, color: Color)

  Draw ellipse

`pyray.``draw_ellipse_lines`(centerX: int, centerY: int, radiusH: float, radiusV: float, color: Color)

  Draw ellipse outline

`pyray.``draw_fps`(posX: int, posY: int)

  Draw current FPS

`pyray.``draw_grid`(slices: int, spacing: float)

  Draw a grid (centered at (0, 0, 0))

`pyray.``draw_line`(startPosX: int, startPosY: int, endPosX: int, endPosY: int, color: Color)

  Draw a line

`pyray.``draw_line_3d`(startPos: Vector3, endPos: Vector3, color: Color)

  Draw a line in 3D world space

`pyray.``draw_line_bezier`(startPos: Vector2, endPos: Vector2, thick: float, color: Color)

  Draw a line using cubic-bezier curves in-out

`pyray.``draw_line_bezier_quad`(startPos: Vector2, endPos: Vector2, controlPos: Vector2, thick: float, color: Color)

  raw line using quadratic bezier curves with a control point

`pyray.``draw_line_ex`(startPos: Vector2, endPos: Vector2, thick: float, color: Color)

  Draw a line defining thickness

`pyray.``draw_line_strip`(points: Any, pointsCount: int, color: Color)

  Draw lines sequence

`pyray.``draw_line_v`(startPos: Vector2, endPos: Vector2, color: Color)

  Draw a line (Vector version)

`pyray.``draw_mesh`(mesh: Mesh, material: Material, transform: Matrix)

  Draw a 3d mesh with material and transform

`pyray.``draw_mesh_instanced`(mesh: Mesh, material: Material, transforms: Any, instances: int)

  Draw multiple mesh instances with material and different transforms

`pyray.``draw_model`(model: Model, position: Vector3, scale: float, tint: Color)

  Draw a model (with texture if set)

`pyray.``draw_model_ex`(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: float, scale: Vector3, tint: Color)

  Draw a model with extended parameters

`pyray.``draw_model_wires`(model: Model, position: Vector3, scale: float, tint: Color)

  Draw a model wires (with texture if set)

`pyray.``draw_model_wires_ex`(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: float, scale: Vector3, tint: Color)

  Draw a model wires (with texture if set) with extended parameters

`pyray.``draw_pixel`(posX: int, posY: int, color: Color)

  Draw a pixel

`pyray.``draw_pixel_v`(position: Vector2, color: Color)

  Draw a pixel (Vector version)

`pyray.``draw_plane`(centerPos: Vector3, size: Vector2, color: Color)

  Draw a plane XZ

`pyray.``draw_point_3d`(position: Vector3, color: Color)

  Draw a point in 3D space, actually a small line

`pyray.``draw_poly`(center: Vector2, sides: int, radius: float, rotation: float, color: Color)

  Draw a regular polygon (Vector version)

`pyray.``draw_poly_lines`(center: Vector2, sides: int, radius: float, rotation: float, color: Color)

  Draw a polygon outline of n sides

`pyray.``draw_ray`(ray: Ray, color: Color)

  Draw a ray line

`pyray.``draw_rectangle`(posX: int, posY: int, width: int, height: int, color: Color)

  Draw a color-filled rectangle

`pyray.``draw_rectangle_gradient_ex`(rec: Rectangle, col1: Color, col2: Color, col3: Color, col4: Color)

  Draw a gradient-filled rectangle with custom vertex colors

`pyray.``draw_rectangle_gradient_h`(posX: int, posY: int, width: int, height: int, color1: Color, color2: Color)

  Draw a horizontal-gradient-filled rectangle

`pyray.``draw_rectangle_gradient_v`(posX: int, posY: int, width: int, height: int, color1: Color, color2: Color)

  Draw a vertical-gradient-filled rectangle

`pyray.``draw_rectangle_lines`(posX: int, posY: int, width: int, height: int, color: Color)

  Draw rectangle outline

`pyray.``draw_rectangle_lines_ex`(rec: Rectangle, lineThick: int, color: Color)

  Draw rectangle outline with extended parameters

`pyray.``draw_rectangle_pro`(rec: Rectangle, origin: Vector2, rotation: float, color: Color)

  Draw a color-filled rectangle with pro parameters

`pyray.``draw_rectangle_rec`(rec: Rectangle, color: Color)

  Draw a color-filled rectangle

`pyray.``draw_rectangle_rounded`(rec: Rectangle, roundness: float, segments: int, color: Color)

  Draw rectangle with rounded edges

`pyray.``draw_rectangle_rounded_lines`(rec: Rectangle, roundness: float, segments: int, lineThick: int, color: Color)

  Draw rectangle with rounded edges outline

`pyray.``draw_rectangle_v`(position: Vector2, size: Vector2, color: Color)

  Draw a color-filled rectangle (Vector version)

`pyray.``draw_ring`(center: Vector2, innerRadius: float, outerRadius: float, startAngle: float, endAngle: float, segments: int, color: Color)

  Draw ring

`pyray.``draw_ring_lines`(center: Vector2, innerRadius: float, outerRadius: float, startAngle: float, endAngle: float, segments: int, color: Color)

  Draw ring outline

`pyray.``draw_sphere`(centerPos: Vector3, radius: float, color: Color)

  Draw sphere

`pyray.``draw_sphere_ex`(centerPos: Vector3, radius: float, rings: int, slices: int, color: Color)

  Draw sphere with extended parameters

`pyray.``draw_sphere_wires`(centerPos: Vector3, radius: float, rings: int, slices: int, color: Color)

  Draw sphere wires

`pyray.``draw_text`(text: str, posX: int, posY: int, fontSize: int, color: Color)

  Draw text (using default font)

`pyray.``draw_text_codepoint`(font: Font, codepoint: int, position: Vector2, fontSize: float, tint: Color)

  Draw one character (codepoint)

`pyray.``draw_text_ex`(font: Font, text: str, position: Vector2, fontSize: float, spacing: float, tint: Color)

  Draw text using font and additional parameters

`pyray.``draw_text_rec`(font: Font, text: str, rec: Rectangle, fontSize: float, spacing: float, wordWrap: bool, tint: Color)

  Draw text using font inside rectangle limits

`pyray.``draw_text_rec_ex`(font: Font, text: str, rec: Rectangle, fontSize: float, spacing: float, wordWrap: bool, tint: Color, selectStart: int, selectLength: int, selectTint: Color, selectBackTint: Color)

  Draw text using font inside rectangle limits with support for text selection

`pyray.``draw_texture`(texture: Texture, posX: int, posY: int, tint: Color)

  Draw a Texture2D

`pyray.``draw_texture_ex`(texture: Texture, position: Vector2, rotation: float, scale: float, tint: Color)

  Draw a Texture2D with extended parameters

`pyray.``draw_texture_n_patch`(texture: Texture, nPatchInfo: NPatchInfo, dest: Rectangle, origin: Vector2, rotation: float, tint: Color)

  Draws a texture (or part of it) that stretches or shrinks nicely

`pyray.``draw_texture_poly`(texture: Texture, center: Vector2, points: Any, texcoords: Any, pointsCount: int, tint: Color)

  Draw a textured polygon

`pyray.``draw_texture_pro`(texture: Texture, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: float, tint: Color)

  Draw a part of a texture defined by a rectangle with ‘pro’ parameters

`pyray.``draw_texture_quad`(texture: Texture, tiling: Vector2, offset: Vector2, quad: Rectangle, tint: Color)

  Draw texture quad with tiling and offset parameters

`pyray.``draw_texture_rec`(texture: Texture, source: Rectangle, position: Vector2, tint: Color)

  Draw a part of a texture defined by a rectangle

`pyray.``draw_texture_tiled`(texture: Texture, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: float, scale: float, tint: Color)

  Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.

`pyray.``draw_texture_v`(texture: Texture, position: Vector2, tint: Color)

  Draw a Texture2D with position defined as Vector2

`pyray.``draw_triangle`(v1: Vector2, v2: Vector2, v3: Vector2, color: Color)

  Draw a color-filled triangle (vertex in counter-clockwise order!)

`pyray.``draw_triangle_3d`(v1: Vector3, v2: Vector3, v3: Vector3, color: Color)

  Draw a color-filled triangle (vertex in counter-clockwise order!)

`pyray.``draw_triangle_fan`(points: Any, pointsCount: int, color: Color)

  Draw a triangle fan defined by points (first vertex is the center)

`pyray.``draw_triangle_lines`(v1: Vector2, v2: Vector2, v3: Vector2, color: Color)

  Draw triangle outline (vertex in counter-clockwise order!)

`pyray.``draw_triangle_strip`(points: Any, pointsCount: int, color: Color)

  Draw a triangle strip defined by points

`pyray.``draw_triangle_strip_3d`(points: Any, pointsCount: int, color: Color)

  Draw a triangle strip defined by points

`pyray.``enable_cursor`()

  Enables cursor (unlock cursor)

`pyray.``end_blend_mode`()

  End blending mode (reset to default: alpha blending)

`pyray.``end_drawing`()

  End canvas drawing and swap buffers (double buffering)

`pyray.``end_mode_2d`()

  Ends 2D mode with custom camera

`pyray.``end_mode_3d`()

  Ends 3D mode and returns to default 2D orthographic mode

`pyray.``end_scissor_mode`()

  End scissor mode

`pyray.``end_shader_mode`()

  End custom shader drawing (use default shader)

`pyray.``end_texture_mode`()

  Ends drawing to render texture

`pyray.``end_vr_stereo_mode`()

  End stereo rendering (requires VR simulator)

`pyray.``export_image`(image: Image, fileName: str)

  Export image data to file, returns true on success

`pyray.``export_image_as_code`(image: Image, fileName: str)

  Export image as code file defining an array of bytes, returns true on success

`pyray.``export_mesh`(mesh: Mesh, fileName: str)

  Export mesh data to file, returns true on success

`pyray.``export_wave`(wave: Wave, fileName: str)

  Export wave data to file, returns true on success

`pyray.``export_wave_as_code`(wave: Wave, fileName: str)

  Export wave sample data to code (.h), returns true on success

`pyray.``fade`(color: Color, alpha: float)

  Get color with alpha applied, alpha goes from 0.0f to 1.0f

`pyray.``file_exists`(fileName: str)

  Check if file exists

`pyray.``gen_image_cellular`(width: int, height: int, tileSize: int)

  Generate image: cellular algorithm. Bigger tileSize means bigger cells

`pyray.``gen_image_checked`(width: int, height: int, checksX: int, checksY: int, col1: Color, col2: Color)

  Generate image: checked

`pyray.``gen_image_color`(width: int, height: int, color: Color)

  Generate image: plain color

`pyray.``gen_image_font_atlas`(chars: Any, recs: Any, charsCount: int, fontSize: int, padding: int, packMethod: int)

  Generate image font atlas using chars info

`pyray.``gen_image_gradient_h`(width: int, height: int, left: Color, right: Color)

  Generate image: horizontal gradient

`pyray.``gen_image_gradient_radial`(width: int, height: int, density: float, inner: Color, outer: Color)

  Generate image: radial gradient

`pyray.``gen_image_gradient_v`(width: int, height: int, top: Color, bottom: Color)

  Generate image: vertical gradient

`pyray.``gen_image_perlin_noise`(width: int, height: int, offsetX: int, offsetY: int, scale: float)

  Generate image: perlin noise

`pyray.``gen_image_white_noise`(width: int, height: int, factor: float)

  Generate image: white noise

`pyray.``gen_mesh_cube`(width: float, height: float, length: float)

  Generate cuboid mesh

`pyray.``gen_mesh_cubicmap`(cubicmap: Image, cubeSize: Vector3)

  Generate cubes-based map mesh from image data

`pyray.``gen_mesh_cylinder`(radius: float, height: float, slices: int)

  Generate cylinder mesh

`pyray.``gen_mesh_heightmap`(heightmap: Image, size: Vector3)

  Generate heightmap mesh from image data

`pyray.``gen_mesh_hemi_sphere`(radius: float, rings: int, slices: int)

  Generate half-sphere mesh (no bottom cap)

`pyray.``gen_mesh_knot`(radius: float, size: float, radSeg: int, sides: int)

  Generate trefoil knot mesh

`pyray.``gen_mesh_plane`(width: float, length: float, resX: int, resZ: int)

  Generate plane mesh (with subdivisions)

`pyray.``gen_mesh_poly`(sides: int, radius: float)

  Generate polygonal mesh

`pyray.``gen_mesh_sphere`(radius: float, rings: int, slices: int)

  Generate sphere mesh (standard sphere)

`pyray.``gen_mesh_torus`(radius: float, size: float, radSeg: int, sides: int)

  Generate torus mesh

`pyray.``gen_texture_mipmaps`(texture: Any)

  Generate GPU mipmaps for a texture

`pyray.``get_camera_matrix`(camera: Camera3D)

  Get camera transform matrix (view matrix)

`pyray.``get_camera_matrix_2d`(camera: Camera2D)

  Get camera 2d transform matrix

`pyray.``get_char_pressed`()

  Get char pressed (unicode), call it multiple times for chars queued

`pyray.``get_clipboard_text`()

  Get clipboard text content

`pyray.``get_codepoints`(text: str, count: Any)

  Get all codepoints in a string, codepoints count returned by parameters

`pyray.``get_codepoints_count`(text: str)

  Get total number of characters (codepoints) in a UTF8 encoded string

`pyray.``get_collision_ray_ground`(Ray_0: Ray, float_1: float)

  struct RayHitInfo GetCollisionRayGround(struct Ray, float);

  CFFI C function from raylib._raylib_cffi.lib

`pyray.``get_collision_ray_mesh`(Ray_0: Ray, Mesh_1: Mesh, Matrix_2: Matrix)

  struct RayHitInfo GetCollisionRayMesh(struct Ray, struct Mesh, struct Matrix);

  CFFI C function from raylib._raylib_cffi.lib

`pyray.``get_collision_ray_model`(Ray_0: Ray, Model_1: Model)

  struct RayHitInfo GetCollisionRayModel(struct Ray, struct Model);

  CFFI C function from raylib._raylib_cffi.lib

`pyray.``get_collision_ray_triangle`(Ray_0: Ray, Vector3_1: Vector3, Vector3_2: Vector3, Vector3_3: Vector3)

  struct RayHitInfo GetCollisionRayTriangle(struct Ray, struct Vector3, struct Vector3, struct Vector3);

  CFFI C function from raylib._raylib_cffi.lib

`pyray.``get_collision_rec`(rec1: Rectangle, rec2: Rectangle)

  Get collision rectangle for two rectangles collision

`pyray.``get_color`(hexValue: int)

  Get Color structure from hexadecimal value

`pyray.``get_current_monitor`()

  Get current connected monitor

`pyray.``get_directory_files`(dirPath: str, count: Any)

  Get filenames in a directory path (memory should be freed)

`pyray.``get_directory_path`(filePath: str)

  Get full path for a given fileName with path (uses static string)

`pyray.``get_dropped_files`(count: Any)

  Get dropped files names (memory should be freed)

`pyray.``get_file_extension`(fileName: str)

  Get pointer to extension for a filename string (includes dot: ‘.png’)

`pyray.``get_file_mod_time`(fileName: str)

  Get file modification time (last write time)

`pyray.``get_file_name`(filePath: str)

  Get pointer to filename for a path string

`pyray.``get_file_name_without_ext`(filePath: str)

  Get filename string without extension (uses static string)

`pyray.``get_font_default`()

  Get the default Font

`pyray.``get_fps`()

  Get current FPS

`pyray.``get_frame_time`()

  Get time in seconds for last frame drawn (delta time)

`pyray.``get_gamepad_axis_count`(gamepad: int)

  Get gamepad axis count for a gamepad

`pyray.``get_gamepad_axis_movement`(gamepad: int, axis: int)

  Get axis movement value for a gamepad axis

`pyray.``get_gamepad_button_pressed`()

  Get the last gamepad button pressed

`pyray.``get_gamepad_name`(gamepad: int)

  Get gamepad internal name id

`pyray.``get_gesture_detected`()

  Get latest detected gesture

`pyray.``get_gesture_drag_angle`()

  Get gesture drag angle

`pyray.``get_gesture_drag_vector`()

  Get gesture drag vector

`pyray.``get_gesture_hold_duration`()

  Get gesture hold time in milliseconds

`pyray.``get_gesture_pinch_angle`()

  Get gesture pinch angle

`pyray.``get_gesture_pinch_vector`()

  Get gesture pinch delta

`pyray.``get_glyph_index`(font: Font, codepoint: int)

  Get index position for a unicode character on font

`pyray.``get_image_alpha_border`(image: Image, threshold: float)

  Get image alpha border rectangle

`pyray.``get_key_pressed`()

  Get key pressed (keycode), call it multiple times for keys queued

`pyray.``get_monitor_count`()

  Get number of connected monitors

`pyray.``get_monitor_height`(monitor: int)

  Get specified monitor height (max available by monitor)

`pyray.``get_monitor_name`(monitor: int)

  Get the human-readable, UTF-8 encoded name of the primary monitor

`pyray.``get_monitor_physical_height`(monitor: int)

  Get specified monitor physical height in millimetres

`pyray.``get_monitor_physical_width`(monitor: int)

  Get specified monitor physical width in millimetres

`pyray.``get_monitor_position`(monitor: int)

  Get specified monitor position

`pyray.``get_monitor_refresh_rate`(monitor: int)

  Get specified monitor refresh rate

`pyray.``get_monitor_width`(monitor: int)

  Get specified monitor width (max available by monitor)

`pyray.``get_mouse_position`()

  Get mouse position XY

`pyray.``get_mouse_ray`(mousePosition: Vector2, camera: Camera3D)

  Get a ray trace from mouse position

`pyray.``get_mouse_wheel_move`()

  Get mouse wheel movement Y

`pyray.``get_mouse_x`()

  Get mouse position X

`pyray.``get_mouse_y`()

  Get mouse position Y

`pyray.``get_music_time_length`(music: Music)

  Get music time length (in seconds)

`pyray.``get_music_time_played`(music: Music)

  Get current music time played (in seconds)

`pyray.``get_next_codepoint`(text: str, bytesProcessed: Any)

  Get next codepoint in a UTF8 encoded string; 0x3f(‘?’) is returned on failure

`pyray.``get_pixel_color`(srcPtr: Any, format: int)

  Get Color from a source pixel pointer of certain format

`pyray.``get_pixel_data_size`(width: int, height: int, format: int)

  Get pixel data size in bytes for certain format

`pyray.``get_prev_directory_path`(dirPath: str)

  Get previous directory path for a given path (uses static string)

`pyray.``get_random_value`(min: int, max: int)

  Get a random value between min and max (both included)

`pyray.``get_screen_data`()

  Get pixel data from screen buffer and return an Image (screenshot)

`pyray.``get_screen_height`()

  Get current screen height

`pyray.``get_screen_to_world_2d`(position: Vector2, camera: Camera2D)

  Get the world space position for a 2d camera screen space position

`pyray.``get_screen_width`()

  Get current screen width

`pyray.``get_shader_location`(shader: Shader, uniformName: str)

  Get shader uniform location

`pyray.``get_shader_location_attrib`(shader: Shader, attribName: str)

  Get shader attribute location

`pyray.``get_sounds_playing`()

  Get number of sounds playing in the multichannel

`pyray.``get_texture_data`(texture: Texture)

  Get pixel data from GPU texture and return an Image

`pyray.``get_time`()

  Get elapsed time in seconds since InitWindow()

`pyray.``get_touch_points_count`()

  Get touch points count

`pyray.``get_touch_position`(index: int)

  Get touch position XY for a touch point index (relative to screen size)

`pyray.``get_touch_x`()

  Get touch position X for touch point 0 (relative to screen size)

`pyray.``get_touch_y`()

  Get touch position Y for touch point 0 (relative to screen size)

`pyray.``get_window_handle`()

  Get native window handle

`pyray.``get_window_position`()

  Get window position XY on monitor

`pyray.``get_window_scale_dpi`()

  Get window scale DPI factor

`pyray.``get_working_directory`()

  Get current working directory (uses static string)

`pyray.``get_world_to_screen`(position: Vector3, camera: Camera3D)

  Get the screen space position for a 3d world space position

`pyray.``get_world_to_screen_2d`(position: Vector2, camera: Camera2D)

  Get the screen space position for a 2d camera world space position

`pyray.``get_world_to_screen_ex`(position: Vector3, camera: Camera3D, width: int, height: int)

  Get size position for a 3d world space position

`pyray.``hide_cursor`()

  Hides cursor

`pyray.``image_alpha_clear`(image: Any, color: Color, threshold: float)

  Clear alpha channel to desired color

`pyray.``image_alpha_crop`(image: Any, threshold: float)

  Crop image depending on alpha value

`pyray.``image_alpha_mask`(image: Any, alphaMask: Image)

  Apply alpha mask to image

`pyray.``image_alpha_premultiply`(image: Any)

  Premultiply alpha channel

`pyray.``image_clear_background`(dst: Any, color: Color)

  Clear image background with given color

`pyray.``image_color_brightness`(image: Any, brightness: int)

  Modify image color: brightness (-255 to 255)

`pyray.``image_color_contrast`(image: Any, contrast: float)

  Modify image color: contrast (-100 to 100)

`pyray.``image_color_grayscale`(image: Any)

  Modify image color: grayscale

`pyray.``image_color_invert`(image: Any)

  Modify image color: invert

`pyray.``image_color_replace`(image: Any, color: Color, replace: Color)

  Modify image color: replace color

`pyray.``image_color_tint`(image: Any, color: Color)

  Modify image color: tint

`pyray.``image_copy`(image: Image)

  Create an image duplicate (useful for transformations)

`pyray.``image_crop`(image: Any, crop: Rectangle)

  Crop an image to a defined rectangle

`pyray.``image_dither`(image: Any, rBpp: int, gBpp: int, bBpp: int, aBpp: int)

  Dither image data to 16bpp or lower (Floyd-Steinberg dithering)

`pyray.``image_draw`(dst: Any, src: Image, srcRec: Rectangle, dstRec: Rectangle, tint: Color)

  Draw a source image within a destination image (tint applied to source)

`pyray.``image_draw_circle`(dst: Any, centerX: int, centerY: int, radius: int, color: Color)

  Draw circle within an image

`pyray.``image_draw_circle_v`(dst: Any, center: Vector2, radius: int, color: Color)

  Draw circle within an image (Vector version)

`pyray.``image_draw_line`(dst: Any, startPosX: int, startPosY: int, endPosX: int, endPosY: int, color: Color)

  Draw line within an image

`pyray.``image_draw_line_v`(dst: Any, start: Vector2, end: Vector2, color: Color)

  Draw line within an image (Vector version)

`pyray.``image_draw_pixel`(dst: Any, posX: int, posY: int, color: Color)

  Draw pixel within an image

`pyray.``image_draw_pixel_v`(dst: Any, position: Vector2, color: Color)

  Draw pixel within an image (Vector version)

`pyray.``image_draw_rectangle`(dst: Any, posX: int, posY: int, width: int, height: int, color: Color)

  Draw rectangle within an image

`pyray.``image_draw_rectangle_lines`(dst: Any, rec: Rectangle, thick: int, color: Color)

  Draw rectangle lines within an image

`pyray.``image_draw_rectangle_rec`(dst: Any, rec: Rectangle, color: Color)

  Draw rectangle within an image

`pyray.``image_draw_rectangle_v`(dst: Any, position: Vector2, size: Vector2, color: Color)

  Draw rectangle within an image (Vector version)

`pyray.``image_draw_text`(dst: Any, text: str, posX: int, posY: int, fontSize: int, color: Color)

  Draw text (using default font) within an image (destination)

`pyray.``image_draw_text_ex`(dst: Any, font: Font, text: str, position: Vector2, fontSize: float, spacing: float, tint: Color)

  Draw text (custom sprite font) within an image (destination)

`pyray.``image_flip_horizontal`(image: Any)

  Flip image horizontally

`pyray.``image_flip_vertical`(image: Any)

  Flip image vertically

`pyray.``image_format`(image: Any, newFormat: int)

  Convert image data to desired format

`pyray.``image_from_image`(image: Image, rec: Rectangle)

  Create an image from another image piece

`pyray.``image_mipmaps`(image: Any)

  Compute all mipmap levels for a provided image

`pyray.``image_resize`(image: Any, newWidth: int, newHeight: int)

  Resize image (Bicubic scaling algorithm)

`pyray.``image_resize_canvas`(image: Any, newWidth: int, newHeight: int, offsetX: int, offsetY: int, fill: Color)

  Resize canvas and fill with color

`pyray.``image_resize_nn`(image: Any, newWidth: int, newHeight: int)

  Resize image (Nearest-Neighbor scaling algorithm)

`pyray.``image_rotate_ccw`(image: Any)

  Rotate image counter-clockwise 90deg

`pyray.``image_rotate_cw`(image: Any)

  Rotate image clockwise 90deg

`pyray.``image_text`(text: str, fontSize: int, color: Color)

  Create an image from text (default font)

`pyray.``image_text_ex`(font: Font, text: str, fontSize: float, spacing: float, tint: Color)

  Create an image from text (custom sprite font)

`pyray.``image_to_pot`(image: Any, fill: Color)

  Convert image to POT (power-of-two)

`pyray.``init_audio_device`()

  Initialize audio device and context

`pyray.``init_audio_stream`(unsignedint_0: int, unsignedint_1: int, unsignedint_2: int)

  struct AudioStream InitAudioStream(unsigned int, unsigned int, unsigned int);

  CFFI C function from raylib._raylib_cffi.lib

`pyray.``init_window`(width: int, height: int, title: str)

  Initialize window and OpenGL context

`pyray.``is_audio_device_ready`()

  Check if audio device has been initialized successfully

`pyray.``is_audio_stream_playing`(stream: AudioStream)

  Check if audio stream is playing

`pyray.``is_audio_stream_processed`(stream: AudioStream)

  Check if any audio stream buffers requires refill

`pyray.``is_cursor_hidden`()

  Check if cursor is not visible

`pyray.``is_cursor_on_screen`()

  Check if cursor is on the screen

`pyray.``is_file_dropped`()

  Check if a file has been dropped into window

`pyray.``is_file_extension`(fileName: str, ext: str)

  Check file extension (including point: .png, .wav)

`pyray.``is_gamepad_available`(gamepad: int)

  Check if a gamepad is available

`pyray.``is_gamepad_button_down`(gamepad: int, button: int)

  Check if a gamepad button is being pressed

`pyray.``is_gamepad_button_pressed`(gamepad: int, button: int)

  Check if a gamepad button has been pressed once

`pyray.``is_gamepad_button_released`(gamepad: int, button: int)

  Check if a gamepad button has been released once

`pyray.``is_gamepad_button_up`(gamepad: int, button: int)

  Check if a gamepad button is NOT being pressed

`pyray.``is_gamepad_name`(gamepad: int, name: str)

  Check gamepad name (if available)

`pyray.``is_gesture_detected`(gesture: int)

  Check if a gesture have been detected

`pyray.``is_key_down`(key: int)

  Check if a key is being pressed

`pyray.``is_key_pressed`(key: int)

  Check if a key has been pressed once

`pyray.``is_key_released`(key: int)

  Check if a key has been released once

`pyray.``is_key_up`(key: int)

  Check if a key is NOT being pressed

`pyray.``is_model_animation_valid`(model: Model, anim: ModelAnimation)

  Check model animation skeleton match

`pyray.``is_mouse_button_down`(button: int)

  Check if a mouse button is being pressed

`pyray.``is_mouse_button_pressed`(button: int)

  Check if a mouse button has been pressed once

`pyray.``is_mouse_button_released`(button: int)

  Check if a mouse button has been released once

`pyray.``is_mouse_button_up`(button: int)

  Check if a mouse button is NOT being pressed

`pyray.``is_music_playing`(Music_0: Music)

  _Bool IsMusicPlaying(struct Music);

  CFFI C function from raylib._raylib_cffi.lib

`pyray.``is_sound_playing`(sound: Sound)

  Check if a sound is currently playing

`pyray.``is_window_focused`()

  Check if window is currently focused (only PLATFORM_DESKTOP)

`pyray.``is_window_fullscreen`()

  Check if window is currently fullscreen

`pyray.``is_window_hidden`()

  Check if window is currently hidden (only PLATFORM_DESKTOP)

`pyray.``is_window_maximized`()

  Check if window is currently maximized (only PLATFORM_DESKTOP)

`pyray.``is_window_minimized`()

  Check if window is currently minimized (only PLATFORM_DESKTOP)

`pyray.``is_window_ready`()

  Check if window has been initialized successfully

`pyray.``is_window_resized`()

  Check if window has been resized last frame

`pyray.``is_window_state`(flag: int)

  Check if one specific window flag is enabled

`pyray.``load_file_data`(fileName: str, bytesRead: Any)

  Load file data as byte array (read)

`pyray.``load_file_text`(fileName: str)

  Load text data from file (read), returns a ‘ 0’ terminated string

`pyray.``load_font`(fileName: str)

  Load font from file into GPU memory (VRAM)

`pyray.``load_font_data`(fileData: str, dataSize: int, fontSize: int, fontChars: Any, charsCount: int, type: int)

  Load font data for further use

`pyray.``load_font_ex`(fileName: str, fontSize: int, fontChars: Any, charsCount: int)

  Load font from file with extended parameters

`pyray.``load_font_from_image`(image: Image, key: Color, firstChar: int)

  Load font from Image (XNA style)

`pyray.``load_font_from_memory`(fileType: str, fileData: str, dataSize: int, fontSize: int, fontChars: Any, charsCount: int)

  Load font from memory buffer, fileType refers to extension: i.e. ‘.ttf’

`pyray.``load_image`(fileName: str)

  Load image from file into CPU memory (RAM)

`pyray.``load_image_anim`(fileName: str, frames: Any)

  Load image sequence from file (frames appended to image.data)

`pyray.``load_image_colors`(image: Image)

  Load color data from image as a Color array (RGBA - 32bit)

`pyray.``load_image_from_memory`(fileType: str, fileData: str, dataSize: int)

  Load image from memory buffer, fileType refers to extension: i.e. ‘.png’

`pyray.``load_image_palette`(image: Image, maxPaletteSize: int, colorsCount: Any)

  Load colors palette from image as a Color array (RGBA - 32bit)

`pyray.``load_image_raw`(fileName: str, width: int, height: int, format: int, headerSize: int)

  Load image from RAW file data

`pyray.``load_material_default`()

  Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)

`pyray.``load_materials`(fileName: str, materialCount: Any)

  Load materials from model file

`pyray.``load_model`(fileName: str)

  Load model from files (meshes and materials)

`pyray.``load_model_animations`(fileName: str, animsCount: Any)

  Load model animations from file

`pyray.``load_model_from_mesh`(mesh: Mesh)

  Load model from generated mesh (default material)

`pyray.``load_music_stream`(fileName: str)

  Load music stream from file

`pyray.``load_music_stream_from_memory`(fileType: str, data: str, dataSize: int)

  Load music stream from data

`pyray.``load_render_texture`(width: int, height: int)

  Load texture for rendering (framebuffer)

`pyray.``load_shader`(vsFileName: str, fsFileName: str)

  Load shader from files and bind default locations

`pyray.``load_shader_from_memory`(vsCode: str, fsCode: str)

  Load shader from code strings and bind default locations

`pyray.``load_sound`(fileName: str)

  Load sound from file

`pyray.``load_sound_from_wave`(wave: Wave)

  Load sound from wave data

`pyray.``load_storage_value`(position: int)

  Load integer value from storage file (from defined position)

`pyray.``load_texture`(fileName: str)

  Load texture from file into GPU memory (VRAM)

`pyray.``load_texture_cubemap`(image: Image, layout: int)

  Load cubemap from image, multiple image cubemap layouts supported

`pyray.``load_texture_from_image`(image: Image)

  Load texture from image data

`pyray.``load_vr_stereo_config`(device: VrDeviceInfo)

  Load VR stereo config for VR simulator device parameters

`pyray.``load_wave`(fileName: str)

  Load wave data from file

`pyray.``load_wave_from_memory`(fileType: str, fileData: str, dataSize: int)

  Load wave from memory buffer, fileType refers to extension: i.e. ‘.wav’

`pyray.``load_wave_samples`(wave: Wave)

  Load samples data from wave as a floats array

`pyray.``maximize_window`()

  Set window state: maximized, if resizable (only PLATFORM_DESKTOP)

`pyray.``measure_text`(text: str, fontSize: int)

  Measure string width for default font

`pyray.``measure_text_ex`(font: Font, text: str, fontSize: float, spacing: float)

  Measure string size for Font

`pyray.``mem_alloc`(size: int)

  Internal memory allocator

`pyray.``mem_free`(ptr: Any)

  Internal memory free

`pyray.``mem_realloc`(ptr: Any, size: int)

  Internal memory reallocator

`pyray.``mesh_binormals`(mesh: Any)

  Compute mesh binormals

`pyray.``mesh_bounding_box`(Mesh_0: Mesh)

  struct BoundingBox MeshBoundingBox(struct Mesh);

  CFFI C function from raylib._raylib_cffi.lib

`pyray.``mesh_tangents`(mesh: Any)

  Compute mesh tangents

`pyray.``minimize_window`()

  Set window state: minimized, if resizable (only PLATFORM_DESKTOP)

`pyray.``open_url`(url: str)

  Open URL with default system browser (if available)

`pyray.``pause_audio_stream`(stream: AudioStream)

  Pause audio stream

`pyray.``pause_music_stream`(music: Music)

  Pause music playing

`pyray.``pause_sound`(sound: Sound)

  Pause a sound

`pyray.``play_audio_stream`(stream: AudioStream)

  Play audio stream

`pyray.``play_music_stream`(music: Music)

  Start music playing

`pyray.``play_sound`(sound: Sound)

  Play a sound

`pyray.``play_sound_multi`(sound: Sound)

  Play a sound (using multichannel buffer pool)

`pyray.``pointer`(struct)

`pyray.``restore_window`()

  Set window state: not minimized/maximized (only PLATFORM_DESKTOP)

`pyray.``resume_audio_stream`(stream: AudioStream)

  Resume audio stream

`pyray.``resume_music_stream`(music: Music)

  Resume playing paused music

`pyray.``resume_sound`(sound: Sound)

  Resume a paused sound

`pyray.``save_file_data`(fileName: str, data: Any, bytesToWrite: int)

  Save data to file from byte array (write), returns true on success

`pyray.``save_file_text`(fileName: str, text: str)

  Save text data to file (write), string must be ‘ 0’ terminated, returns true on success

`pyray.``save_storage_value`(position: int, value: int)

  Save integer value to storage file (to defined position), returns true on success

`pyray.``set_audio_stream_buffer_size_default`(size: int)

  Default size for new audio streams

`pyray.``set_audio_stream_pitch`(stream: AudioStream, pitch: float)

  Set pitch for audio stream (1.0 is base level)

`pyray.``set_audio_stream_volume`(stream: AudioStream, volume: float)

  Set volume for audio stream (1.0 is max level)

`pyray.``set_camera_alt_control`(keyAlt: int)

  Set camera alt key to combine with mouse movement (free camera)

`pyray.``set_camera_mode`(camera: Camera3D, mode: int)

  Set camera mode (multiple camera modes available)

`pyray.``set_camera_move_controls`(keyFront: int, keyBack: int, keyRight: int, keyLeft: int, keyUp: int, keyDown: int)

  Set camera move controls (1st person and 3rd person cameras)

`pyray.``set_camera_pan_control`(keyPan: int)

  Set camera pan key to combine with mouse movement (free camera)

`pyray.``set_camera_smooth_zoom_control`(keySmoothZoom: int)

  Set camera smooth zoom key to combine with mouse (free camera)

`pyray.``set_clipboard_text`(text: str)

  Set clipboard text content

`pyray.``set_config_flags`(flags: int)

  Setup init configuration flags (view FLAGS)

`pyray.``set_exit_key`(key: int)

  Set a custom key to exit program (default is ESC)

`pyray.``set_gamepad_mappings`(mappings: str)

  Set internal gamepad mappings (SDL_GameControllerDB)

`pyray.``set_gestures_enabled`(flags: int)

  Enable a set of gestures using flags

`pyray.``set_master_volume`(volume: float)

  Set master volume (listener)

`pyray.``set_material_texture`(material: Any, mapType: int, texture: Texture)

  Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR…)

`pyray.``set_model_mesh_material`(model: Any, meshId: int, materialId: int)

  Set material for a mesh

`pyray.``set_mouse_cursor`(cursor: int)

  Set mouse cursor

`pyray.``set_mouse_offset`(offsetX: int, offsetY: int)

  Set mouse offset

`pyray.``set_mouse_position`(x: int, y: int)

  Set mouse position XY

`pyray.``set_mouse_scale`(scaleX: float, scaleY: float)

  Set mouse scaling

`pyray.``set_music_pitch`(music: Music, pitch: float)

  Set pitch for a music (1.0 is base level)

`pyray.``set_music_volume`(music: Music, volume: float)

  Set volume for music (1.0 is max level)

`pyray.``set_pixel_color`(dstPtr: Any, color: Color, format: int)

  Set color formatted into destination pixel pointer

`pyray.``set_shader_value`(shader: Shader, locIndex: int, value: Any, uniformType: int)

  Set shader uniform value

`pyray.``set_shader_value_matrix`(shader: Shader, locIndex: int, mat: Matrix)

  Set shader uniform value (matrix 4x4)

`pyray.``set_shader_value_texture`(shader: Shader, locIndex: int, texture: Texture)

  Set shader uniform value for texture (sampler2d)

`pyray.``set_shader_value_v`(shader: Shader, locIndex: int, value: Any, uniformType: int, count: int)

  Set shader uniform value vector

`pyray.``set_shapes_texture`(texture: Texture, source: Rectangle)

  Set texture and rectangle to be used on shapes drawing

`pyray.``set_sound_pitch`(sound: Sound, pitch: float)

  Set pitch for a sound (1.0 is base level)

`pyray.``set_sound_volume`(sound: Sound, volume: float)

  Set volume for a sound (1.0 is max level)

`pyray.``set_target_fps`(fps: int)

  Set target FPS (maximum)

`pyray.``set_texture_filter`(texture: Texture, filter: int)

  Set texture scaling filter mode

`pyray.``set_texture_wrap`(texture: Texture, wrap: int)

  Set texture wrapping mode

`pyray.``set_trace_log_level`(logLevel: int)

  Set the current threshold (minimum) log level

`pyray.``set_window_icon`(image: Image)

  Set icon for window (only PLATFORM_DESKTOP)

`pyray.``set_window_min_size`(width: int, height: int)

  Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)

`pyray.``set_window_monitor`(monitor: int)

  Set monitor for the current window (fullscreen mode)

`pyray.``set_window_position`(x: int, y: int)

  Set window position on screen (only PLATFORM_DESKTOP)

`pyray.``set_window_size`(width: int, height: int)

  Set window dimensions

`pyray.``set_window_state`(flags: int)

  Set window configuration state using flags

`pyray.``set_window_title`(title: str)

  Set title for window (only PLATFORM_DESKTOP)

`pyray.``show_cursor`()

  Shows cursor

`pyray.``stop_audio_stream`(stream: AudioStream)

  Stop audio stream

`pyray.``stop_music_stream`(music: Music)

  Stop music playing

`pyray.``stop_sound`(sound: Sound)

  Stop playing a sound

`pyray.``stop_sound_multi`()

  Stop any sound playing (using multichannel buffer pool)

`pyray.``take_screenshot`(fileName: str)

  Takes a screenshot of current screen (filename extension defines format)

`pyray.``text_append`(text: str, append: str, position: Any)

  Append text at specific position and move cursor!

`pyray.``text_copy`(dst: str, src: str)

  Copy one string to another, returns bytes copied

`pyray.``text_find_index`(text: str, find: str)

  Find first text occurrence within a string

`pyray.``text_format`(*args)

  VARARG FUNCTION - MAY NOT BE SUPPORTED BY CFFI

`pyray.``text_insert`(text: str, insert: str, position: int)

  Insert text in a position (memory must be freed!)

`pyray.``text_is_equal`(text1: str, text2: str)

  Check if two text string are equal

`pyray.``text_join`(textList: str, count: int, delimiter: str)

  Join text strings with delimiter

`pyray.``text_length`(text: str)

  Get text length, checks for ‘ 0’ ending

`pyray.``text_replace`(text: str, replace: str, by: str)

  Replace text string (memory must be freed!)

`pyray.``text_split`(text: str, delimiter: str, count: Any)

  Split text into multiple strings

`pyray.``text_subtext`(text: str, position: int, length: int)

  Get a piece of a text string

`pyray.``text_to_integer`(text: str)

  Get integer value from text (negative values not supported)

`pyray.``text_to_lower`(text: str)

  Get lower case version of provided string

`pyray.``text_to_pascal`(text: str)

  Get Pascal case notation version of provided string

`pyray.``text_to_upper`(text: str)

  Get upper case version of provided string

`pyray.``text_to_utf8`(codepoints: Any, length: int)

  Encode text codepoint into utf8 text (memory must be freed!)

`pyray.``toggle_fullscreen`()

  Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)

`pyray.``trace_log`(*args)

  VARARG FUNCTION - MAY NOT BE SUPPORTED BY CFFI

`pyray.``unload_file_data`(data: str)

  Unload file data allocated by LoadFileData()

`pyray.``unload_file_text`(text: str)

  Unload file text data allocated by LoadFileText()

`pyray.``unload_font`(font: Font)

  Unload Font from GPU memory (VRAM)

`pyray.``unload_font_data`(chars: Any, charsCount: int)

  Unload font chars info data (RAM)

`pyray.``unload_image`(image: Image)

  Unload image from CPU memory (RAM)

`pyray.``unload_image_colors`(colors: Any)

  Unload color data loaded with LoadImageColors()

`pyray.``unload_image_palette`(colors: Any)

  Unload colors palette loaded with LoadImagePalette()

`pyray.``unload_material`(material: Material)

  Unload material from GPU memory (VRAM)

`pyray.``unload_mesh`(mesh: Mesh)

  Unload mesh data from CPU and GPU

`pyray.``unload_model`(model: Model)

  Unload model (including meshes) from memory (RAM and/or VRAM)

`pyray.``unload_model_animation`(anim: ModelAnimation)

  Unload animation data

`pyray.``unload_model_animations`(animations: Any, count: int)

  Unload animation array data

`pyray.``unload_model_keep_meshes`(model: Model)

  Unload model (but not meshes) from memory (RAM and/or VRAM)

`pyray.``unload_music_stream`(music: Music)

  Unload music stream

`pyray.``unload_render_texture`(target: RenderTexture)

  Unload render texture from GPU memory (VRAM)

`pyray.``unload_shader`(shader: Shader)

  Unload shader from GPU memory (VRAM)

`pyray.``unload_sound`(sound: Sound)

  Unload sound

`pyray.``unload_texture`(texture: Texture)

  Unload texture from GPU memory (VRAM)

`pyray.``unload_vr_stereo_config`(config: VrStereoConfig)

  Unload VR stereo config

`pyray.``unload_wave`(wave: Wave)

  Unload wave data

`pyray.``unload_wave_samples`(samples: Any)

  Unload samples data loaded with LoadWaveSamples()

`pyray.``update_audio_stream`(stream: AudioStream, data: Any, samplesCount: int)

  Update audio stream buffers with data

`pyray.``update_camera`(camera: Any)

  Update camera position for selected mode

`pyray.``update_mesh_buffer`(mesh: Mesh, index: int, data: Any, dataSize: int, offset: int)

  Update mesh vertex data in GPU for a specific buffer index

`pyray.``update_model_animation`(model: Model, anim: ModelAnimation, frame: int)

  Update model animation pose

`pyray.``update_music_stream`(music: Music)

  Updates buffers for music streaming

`pyray.``update_sound`(sound: Sound, data: Any, samplesCount: int)

  Update sound buffer with new data

`pyray.``update_texture`(texture: Texture, pixels: Any)

  Update GPU texture with new data

`pyray.``update_texture_rec`(texture: Texture, rec: Rectangle, pixels: Any)

  Update GPU texture rectangle with new data

`pyray.``upload_mesh`(mesh: Any, dynamic: bool)

  Upload mesh vertex data in GPU and provide VAO/VBO ids

`pyray.``wave_copy`(wave: Wave)

  Copy a wave to a new wave

`pyray.``wave_crop`(wave: Any, initSample: int, finalSample: int)

  Crop a wave to defined samples range

`pyray.``wave_format`(wave: Any, sampleRate: int, sampleSize: int, channels: int)

  Convert wave data to desired format

`pyray.``window_should_close`()

  Check if KEY_ESCAPE pressed or Close icon pressed