🧪 Version 0.3.1 is our alpha release candidate. Please send us bug reports and suggestions!

Sketchingpy

Creative coding and interactive science everywhere for everyone: web, desktop, mobile, Jupyter, and more. Open source!

Reference for get_native

Get the underlying native renderer object. This is part of the reference section.

Purpose

Get access to a renderer specific object where actions can be performed against the underlying API outside of Sketchingpy. Use with caution!

Snippet

Get a Pygame surface for a Sketch2DApp.
sketch = sketchingpy.Sketch2DApp(500, 500, 'Sample Title')
pygame_surface = sketch.get_native()

Availability

Available for all platforms. For Sketch2DApp, returns the Pygame surface. For Sketch2DStatic, returns a Pillow ImageDraw. For Sketch2DWeb, returns the HTML element for the canvas.