_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

class _eve._EVE

Create an _EVE object

register(o: object) → None

Register an object’s write() function

setmodel(m: int) → None

Set the model number of the EVE chip

flush() → None

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:

These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().

Begin(prim: int) → None

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:

BitmapLayout(format: int, linestride: int, height: int) → None

Set the source bitmap memory format and layout for the current handle

Parameters:

BitmapSizeH(width: int, height: int) → None

Set the screen drawing of bitmaps for the current handle. high bits for large bitmaps

Parameters:

BitmapSize(filter: int, wrapx: int, wrapy: int, width: int, height: int) → None

Set the screen drawing of bitmaps for the current handle

Parameters:

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:

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:

These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().

Call(dest: int) → None

Execute a sequence of commands at another location in the display list

Parameters:

dest (int) – display list address. Range 0-65535

Cell(cell: int) → None

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:

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:

ClearStencil(s: int) → None

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().

ClearTag(s: int) → None

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().

ColorA(alpha: int) → None

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:

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:

These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().

Display() → None

End the display list

End() → None

End drawing a graphics primitive

Vertex2ii() and Vertex2f() calls are ignored until the next Begin().

Jump(dest: int) → None

Execute commands at another location in the display list

Parameters:

dest (int) – display list address. Range 0-65535

Macro(m: int) → None

Execute a single command from a macro register

Parameters:

m (int) – macro register to read. Range 0-1

Nop() → None

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().

RestoreContext() → None

Restore the current graphics context from the context stack

Return() → None

Return from a previous call command

SaveContext() → None

Push the current graphics context on the context stack

ScissorSize(width: int, height: int) → None

Set the size of the scissor clip rectangle

Parameters:

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:

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:

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:

These values are part of the graphics context and are saved and restored by SaveContext() and RestoreContext().

TagMask(mask: int) → None

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().

Tag(s: int) → None

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:

This method is an alternative to Vertex2f().

Vertex2f(b: float) → None

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:

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().

cmd0(n: int) → None

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:

Supported format codes: h, H, i, I.

This method is used by the eve module to efficiently add commands to the FIFO.