_eve – Low-level BridgeTek EVE bindings — Adafruit CircuitPython 1 documentation (original) (raw)
The _eve module provides a class _EVE which contains methods for constructing EVE command buffers and appending basic graphics commands.
Available on these boards
- AITHinker ESP32-C3S_Kit_2M
- ATMegaZero ESP32-S2
- Adafruit Feather ESP32 V2
- Adafruit Feather ESP32S3 No PSRAM
- Adafruit Feather M4 CAN
- Adafruit Feather M4 Express
- Adafruit ItsyBitsy ESP32
- Adafruit MatrixPortal S3
- Adafruit Metro ESP32S3
- Adafruit Metro M4 Express
- Adafruit Metro nRF52840 Express
- Adafruit QT Py ESP32 PICO
- Adafruit QT Py ESP32-S3 no psram
- Adafruit-Qualia-S3-RGB666
- Archi RP2040
- Arduino Nano ESP32
- Arduino Nano RP2040 Connect
- AutosportLabs-ESP32-CAN-X2
- BARDUINO 4.0.2
- BBQ20KBD
- BLING!
- BPI-Leaf-S3
- BPI-PicoW-S3
- Bee-Data-Logger
- Bee-Motion-S3
- Bee-S3
- BlizzardS3
- Bradán Lane STUDIO Explorer Badge
- COSMO-Pico
- CRCibernetica IdeaBoard
- Challenger NB RP2040 WiFi
- Challenger RP2040 LTE
- Challenger RP2040 LoRa
- Challenger RP2040 SD/RTC
- Challenger RP2040 SubGHz
- Challenger RP2040 WiFi
- Challenger RP2040 WiFi/BLE
- Challenger+ RP2350 BConnect
- Challenger+ RP2350 WiFi6/BLE5
- CircuitART Zero S3
- ColumbiaDSL-Sensor-Board-V1
- CrowPanel 4.2 EPaper
- Cytron EDU PICO W
- Cytron IRIV IO Controller
- Cytron MOTION 2350 Pro
- Cytron Maker Feather AIoT S3
- Cytron Maker Nano RP2040
- Cytron Maker Pi RP2040
- Cytron Maker Uno RP2040
- DFRobot FireBeetle 2 ESP32-S3
- E-Fidget
- ELECFREAKS PICO:ED
- ES3ink
- ESP32-C6-DevKitC-1-N8
- ESP32-P4 Stamp XL
- ESP32-P4-Function-EV
- ESP32-S2-DevKitC-1-N8R2
- ESP32-S3-Box-2.5
- ESP32-S3-Box-Lite
- ESP32-S3-DevKitC-1-N16
- ESP32-S3-DevKitC-1-N32R8
- ESP32-S3-DevKitC-1-N8
- ESP32-S3-DevKitC-1-N8R2
- ESP32-S3-DevKitC-1-N8R2 (ROS version)
- ESP32-S3-DevKitC-1-N8R8
- ESP32-S3-DevKitC-1-N8R8-with-HACKTABLET
- ESP32-S3-DevKitM-1-N8
- ESP32-S3-EYE
- ESP32-S3-USB-OTG-N8
- Electrolama minik
- Espressif ESP32 DevKitc V4 WROVER
- Espressif-ESP32-S3-LCD-EV-Board
- Espressif-ESP32-S3-LCD-EV-Board_v1.5
- FeatherS2
- FeatherS2 PreRelease
- FeatherS3
- FeatherS3 Neo
- HEIA-FR Picomo V2
- HEIA-FR Picomo V3
- HXR.DK SAO Digital Multimeter
- Hack Club Sprig
- Hardkernel Odroid Go
- Heltec ESP32-S3-WIFI-LoRa-V3
- Heltec Vison Master E290
- Heltec Wireless Paper
- IoTs2
- LILYGO T-DISPLAY
- LILYGO T-DISPLAY S3 v1.2
- LILYGO T-Deck (Plus)
- LILYGO T-Display S3 Pro
- LILYGO T-Dongle S3
- LILYGO T-QT PRO NO PSRAM
- LILYGO T-Watch-S3
- LILYGO TEMBED ESP32S3
- LILYGO TTGO T-DISPLAY v1.1
- LOLIN S3 16MB Flash 8MB PSRAM
- LOLIN S3 PRO 16MB Flash 8MB PSRAM
- Lilygo T-watch 2020 V3
- M5Stack AtomS3
- M5Stack AtomS3 Lite
- M5Stack AtomS3U
- M5Stack Cardputer
- M5Stack Cardputer (ROS version)
- M5Stack Core Basic
- M5Stack Core Fire
- M5Stack Core2
- M5Stack CoreS3
- M5Stack Dial
- M5Stack M5Paper
- M5Stack Stamp-S3
- M5Stack Stick C Plus2
- MakerFabs-ESP32-S3-Parallel-TFT-With-Touch-7inch
- Melopero Shake RP2040
- MicroDev microS2
- NanoS3
- Neuron
- OMGS3
- Oak Dev Tech BREAD2040
- Oak Dev Tech Cast-Away RP2040
- Oak Dev Tech RPGA Feather
- Orpheus Pico
- Oxocard Artwork
- Oxocard Connect
- Oxocard Galaxy
- Oxocard Science
- Pajenicko PicoPad
- Pimoroni Badger 2040
- Pimoroni Badger 2040 W
- Pimoroni Inky Frame 5.7
- Pimoroni Inky Frame 7.3
- Pimoroni Interstate 75
- Pimoroni Keybow 2040
- Pimoroni Motor 2040
- Pimoroni PGA2040
- Pimoroni PGA2350
- Pimoroni Pico DV Base W
- Pimoroni Pico LiPo (16MB)
- Pimoroni Pico LiPo (4MB)
- Pimoroni Pico Plus 2
- Pimoroni Pico Plus 2 W
- Pimoroni Pico dv Base
- Pimoroni PicoSystem
- Pimoroni Plasma 2040
- Pimoroni Plasma 2040W
- Pimoroni Plasma 2350
- Pimoroni Plasma 2350W
- Pimoroni Servo 2040
- Pimoroni Tiny 2040 (2MB)
- Pimoroni Tiny 2040 (8MB)
- Pimoroni Tiny 2350
- Pimoroni Tiny FX
- ProS3
- PyKey 18 Numpad
- PyKey 44 Ergo
- PyKey 60
- PyKey 87 TKL
- RF.Guru RP2040
- RGBTouch Mini
- RP2.65-F
- RP2040 Stamp
- RP2350 Stamp
- RP2350 Stamp XL
- Raspberry Pi Pico
- Raspberry Pi Pico 2
- Raspberry Pi Pico 2 W
- Raspberry Pi Pico W
- Seeed Xiao ESP32-S3 Sense
- SparkFun Teensy MicroMod Processor
- SparkFun Thing Plus RP2350
- Spotpear ESP32C3 LCD 1.69
- Sunton-ESP32-8048S050
- Sunton-ESP32-8048S070
- Teensy 4.0
- Teensy 4.1
- TinyC6
- TinyS3
- TinyWATCH S3
- VCC-GND Studio YD RP2040
- VCC-GND YD-ESP32-S3 (N16R8)
- VCC-GND YD-ESP32-S3 (N8R8)
- VIDI X V1.1
- W5100S-EVB-Pico
- W5100S-EVB-Pico2
- W5500-EVB-Pico
- W5500-EVB-Pico2
- WK-50 Trackball Keyboard
- Waveshare ESP32-S3-ETH
- Waveshare ESP32-S3-GEEK
- Waveshare ESP32-S3-Pico
- Waveshare ESP32S3 LCD 1.28
- Waveshare ESP32S3 Touch LCD 2
- Waveshare RP2040-GEEK
- Waveshare RP2040-LCD-0.96
- Waveshare RP2040-LCD-1.28
- Waveshare RP2040-One
- Waveshare RP2040-PiZero
- Waveshare RP2040-Plus (16MB)
- Waveshare RP2040-Plus (4MB)
- Waveshare RP2040-TOUCH-LCD-1.28
- Waveshare RP2040-Tiny
- Waveshare RP2040-Zero
- Waveshare RP2350-GEEK
- Waveshare RP2350-LCD-0.96
- Waveshare RP2350-LCD-1.28
- Waveshare RP2350-One
- Waveshare RP2350-Plus
- Waveshare RP2350-TOUCH-LCD-1.28
- Waveshare RP2350-Tiny
- Waveshare RP2350-Zero
- WeAct ESP32-C6 (8MB)
- WeAct Studio Pico
- WeAct Studio Pico 16MB
- WisdPi Ardu2040M
- WisdPi Tiny RP2040
class _eve._EVE
Create an _EVE object
Register an object’s write()
function
Set the model number of the EVE chip
Send any queued drawing commands directly to the hardware.
Parameters:
width (int) – The width of the grid in tiles, or 1 for sprites.
cc(b: circuitpython_typing.ReadableBuffer) → None
Append bytes to the command FIFO.
Parameters:
b (ReadableBuffer) – The bytes to add
AlphaFunc(func: int, ref: int) → None
Set the alpha test function
Parameters:
- func (int) – specifies the test function, one of
NEVER
,LESS
,LEQUAL
,GREATER
,GEQUAL
,EQUAL
,NOTEQUAL
, orALWAYS
. Range 0-7. The initial value is ALWAYS(7) - ref (int) – specifies the reference value for the alpha test. Range 0-255. The initial value is 0
These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().
Begin drawing a graphics primitive
Parameters:
prim (int) – graphics primitive.
Valid primitives are BITMAPS
, POINTS
, LINES
, LINE_STRIP
, EDGE_STRIP_R
, EDGE_STRIP_L
, EDGE_STRIP_A
, EDGE_STRIP_B
and RECTS
.
BitmapExtFormat(format: int) → None
Set the bitmap format
Parameters:
format (int) – bitmap pixel format.
BitmapHandle(handle: int) → None
Set the bitmap handle
Parameters:
handle (int) – bitmap handle. Range 0-31. The initial value is 0
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
BitmapLayoutH(linestride: int, height: int) → None
Set the source bitmap memory format and layout for the current handle. high bits for large bitmaps
Parameters:
- linestride (int) – high part of bitmap line stride, in bytes. Range 0-7
- height (int) – high part of bitmap height, in lines. Range 0-3
BitmapLayout(format: int, linestride: int, height: int) → None
Set the source bitmap memory format and layout for the current handle
Parameters:
- format (int) – bitmap pixel format, or GLFORMAT to use BITMAP_EXT_FORMAT instead. Range 0-31
- linestride (int) – bitmap line stride, in bytes. Range 0-1023
- height (int) – bitmap height, in lines. Range 0-511
BitmapSizeH(width: int, height: int) → None
Set the screen drawing of bitmaps for the current handle. high bits for large bitmaps
Parameters:
- width (int) – high part of drawn bitmap width, in pixels. Range 0-3
- height (int) – high part of drawn bitmap height, in pixels. Range 0-3
BitmapSize(filter: int, wrapx: int, wrapy: int, width: int, height: int) → None
Set the screen drawing of bitmaps for the current handle
Parameters:
- filter (int) – bitmap filtering mode, one of
NEAREST
orBILINEAR
. Range 0-1 - wrapx (int) – bitmap \(x\) wrap mode, one of
REPEAT
orBORDER
. Range 0-1 - wrapy (int) – bitmap \(y\) wrap mode, one of
REPEAT
orBORDER
. Range 0-1 - width (int) – drawn bitmap width, in pixels. Range 0-511
- height (int) – drawn bitmap height, in pixels. Range 0-511
BitmapSource(addr: int) → None
Set the source address for bitmap graphics
Parameters:
addr (int) – Bitmap start address, pixel-aligned, low part.
BitmapSourceH(addr: int) → None
Set the high source address for bitmap graphics
Parameters:
addr (int) – Bitmap start address, pixel-aligned, high part.
BitmapSwizzle(r: int, g: int, b: int, a: int) → None
Set the source for the r,g,b and a channels of a bitmap
Parameters:
- r (int) – red component source channel. Range 0-7
- g (int) – green component source channel. Range 0-7
- b (int) – blue component source channel. Range 0-7
- a (int) – alpha component source channel. Range 0-7
BitmapTransformA(v: float) → None
Set the \(a\) component of the bitmap transform matrix
Parameters:
v (float) – The \(a\) component of the bitmap transform matrix
The initial value 1.0.
These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().
BitmapTransformB(v: float) → None
Set the \(b\) component of the bitmap transform matrix
Parameters:
v (float) – The \(b\) component of the bitmap transform matrix
The initial value 0.0.
These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().
BitmapTransformC(v: float) → None
Set the \(c\) component of the bitmap transform matrix
Parameters:
v (int) – The \(c\) component of the bitmap transform matrix
The initial value 0.0.
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
BitmapTransformD(v: float) → None
Set the \(d\) component of the bitmap transform matrix
Parameters:
v (float) – The \(d\) component of the bitmap transform matrix
The initial value 0.0.
These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().
BitmapTransformE(v: float) → None
Set the \(e\) component of the bitmap transform matrix
Parameters:
v (float) – The \(e\) component of the bitmap transform matrix
The initial value 1.0.
These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().
BitmapTransformF(v: int) → None
Set the \(f\) component of the bitmap transform matrix
Parameters:
v (int) – The \(f\) component of the bitmap transform matrix
The initial value 0.0.
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
BlendFunc(src: int, dst: int) → None
Set pixel arithmetic
Parameters:
- src (int) – specifies how the source blending factor is computed. One of
ZERO
,ONE
,SRC_ALPHA
,DST_ALPHA
,ONE_MINUS_SRC_ALPHA
orONE_MINUS_DST_ALPHA
. Range 0-7. The initial value is SRC_ALPHA(2) - dst (int) – specifies how the destination blending factor is computed, one of the same constants as src. Range 0-7. The initial value is ONE_MINUS_SRC_ALPHA(4)
These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().
Execute a sequence of commands at another location in the display list
Parameters:
dest (int) – display list address. Range 0-65535
Set the bitmap cell number for the vertex2f command
Parameters:
cell (int) – bitmap cell number. Range 0-127. The initial value is 0
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
ClearColorA(alpha: int) → None
Set clear value for the alpha channel
Parameters:
alpha (int) – alpha value used when the color buffer is cleared. Range 0-255. The initial value is 0
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
ClearColorRGB(red: int, green: int, blue: int) → None
Set clear values for red, green and blue channels
Parameters:
- red (int) – red value used when the color buffer is cleared. Range 0-255. The initial value is 0
- green (int) – green value used when the color buffer is cleared. Range 0-255. The initial value is 0
- blue (int) – blue value used when the color buffer is cleared. Range 0-255. The initial value is 0
These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().
Clear(c: int, s: int, t: int) → None
Clear buffers to preset values
Parameters:
- c (int) – clear color buffer. Range 0-1
- s (int) – clear stencil buffer. Range 0-1
- t (int) – clear tag buffer. Range 0-1
Set clear value for the stencil buffer
Parameters:
s (int) – value used when the stencil buffer is cleared. Range 0-255. The initial value is 0
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
Set clear value for the tag buffer
Parameters:
s (int) – value used when the tag buffer is cleared. Range 0-255. The initial value is 0
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
Set the current color alpha
Parameters:
alpha (int) – alpha for the current color. Range 0-255. The initial value is 255
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
ColorMask(r: int, g: int, b: int, a: int) → None
Enable and disable writing of frame buffer color components
Parameters:
- r (int) – allow updates to the frame buffer red component. Range 0-1. The initial value is 1
- g (int) – allow updates to the frame buffer green component. Range 0-1. The initial value is 1
- b (int) – allow updates to the frame buffer blue component. Range 0-1. The initial value is 1
- a (int) – allow updates to the frame buffer alpha component. Range 0-1. The initial value is 1
These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().
ColorRGB(red: int, green: int, blue: int) → None
Set the drawing color
Parameters:
- red (int) – red value for the current color. Range 0-255. The initial value is 255
- green (int) – green for the current color. Range 0-255. The initial value is 255
- blue (int) – blue for the current color. Range 0-255. The initial value is 255
These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().
End the display list
End drawing a graphics primitive
Vertex2ii() and Vertex2f() calls are ignored until the next Begin().
Execute commands at another location in the display list
Parameters:
dest (int) – display list address. Range 0-65535
Execute a single command from a macro register
Parameters:
m (int) – macro register to read. Range 0-1
No operation
PaletteSource(addr: int) → None
Set the base address of the palette
Parameters:
addr (int) – Address in graphics RAM, 2-byte aligned, low part.
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
PaletteSourceH(addr: int) → None
Set the base address of the palette
Parameters:
addr (int) – Address in graphics RAM, 2-byte aligned, high part.
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
Restore the current graphics context from the context stack
Return from a previous call command
Push the current graphics context on the context stack
ScissorSize(width: int, height: int) → None
Set the size of the scissor clip rectangle
Parameters:
- width (int) – The width of the scissor clip rectangle, in pixels. Range 0-4095. The initial value is hsize
- height (int) – The height of the scissor clip rectangle, in pixels. Range 0-4095. The initial value is 2048
These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().
ScissorXY(x: int, y: int) → None
Set the top left corner of the scissor clip rectangle
Parameters:
- x (int) – The \(x\) coordinate of the scissor clip rectangle, in pixels. Range 0-2047. The initial value is 0
- y (int) – The \(y\) coordinate of the scissor clip rectangle, in pixels. Range 0-2047. The initial value is 0
These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().
StencilFunc(func: int, ref: int, mask: int) → None
Set function and reference value for stencil testing
Parameters:
- func (int) – specifies the test function, one of
NEVER
,LESS
,LEQUAL
,GREATER
,GEQUAL
,EQUAL
,NOTEQUAL
, orALWAYS
. Range 0-7. The initial value is ALWAYS(7) - ref (int) – specifies the reference value for the stencil test. Range 0-255. The initial value is 0
- mask (int) – specifies a mask that is ANDed with the reference value and the stored stencil value. Range 0-255. The initial value is 255
These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().
StencilMask(mask: int) → None
Control the writing of individual bits in the stencil planes
Parameters:
mask (int) – the mask used to enable writing stencil bits. Range 0-255. The initial value is 255
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
StencilOp(sfail: int, spass: int) → None
Set stencil test actions
Parameters:
- sfail (int) – specifies the action to take when the stencil test fails, one of
KEEP
,ZERO
,REPLACE
,INCR
,INCR_WRAP
,DECR
,DECR_WRAP
, andINVERT
. Range 0-7. The initial value is KEEP(1) - spass (int) – specifies the action to take when the stencil test passes, one of the same constants as sfail. Range 0-7. The initial value is KEEP(1)
These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().
Control the writing of the tag buffer
Parameters:
mask (int) – allow updates to the tag buffer. Range 0-1. The initial value is 1
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
Set the current tag value
Parameters:
s (int) – tag value. Range 0-255. The initial value is 255
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
Vertex2ii(x: int, y: int, handle: int, cell: int) → None
Parameters:
- x (int) – x-coordinate in pixels. Range 0-511
- y (int) – y-coordinate in pixels. Range 0-511
- handle (int) – bitmap handle. Range 0-31
- cell (int) – cell number. Range 0-127
This method is an alternative to Vertex2f().
Draw a point.
Parameters:
LineWidth(width: float) → None
Set the width of rasterized lines
Parameters:
width (float) – line width in pixels. Range 0-511. The initial value is 1
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
PointSize(size: float) → None
Set the diameter of rasterized points
Parameters:
size (float) – point diameter in pixels. Range 0-1023. The initial value is 1
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
Region(y: int, h: int, dest: int) → None
Specify a cull region in the display list
Parameters:
- y (int) – Starting Y band in the render buffer. Range 0-63
- h (int) – Y height in the render buffer. Range 0-63
- dest (int) – destination address in the display list if the raster is outside the region
Set the vertex transformation’s x translation component
Parameters:
x (float) – signed x-coordinate in pixels. Range ±4095. The initial value is 0
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
Set the vertex transformation’s y translation component
Parameters:
y (float) – signed y-coordinate in pixels. Range ±4095. The initial value is 0
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
VertexFormat(frac: int) → None
Set the precision of vertex2f coordinates
Parameters:
frac (int) – Number of fractional bits in X,Y coordinates, 0-4. Range 0-7. The initial value is 4
This value is part of the graphics context and is saved and restored by SaveContext() and RestoreContext().
Append the command word n to the FIFO
Parameters:
n (int) – The command code
This method is used by the eve
module to efficiently add commands to the FIFO.
cmd(n: int, fmt: str, args: Tuple[str, Ellipsis]) → None
Append a command packet to the FIFO.
Parameters:
- n (int) – The command code
- fmt (str) – The command format struct layout
- args (tuple(str, ... )) – The command’s arguments
Supported format codes: h, H, i, I.
This method is used by the eve
module to efficiently add commands to the FIFO.