_eve
– Low-level BridgeTek EVE bindings¶
The _eve
module provides a class _EVE which
contains methods for constructing EVE command
buffers and appending basic graphics commands.
- class _eve._EVE¶
-
- flush() None ¶
Send any queued drawing commands directly to the hardware.
- Paramètres:
width (int) – The width of the grid in tiles, or 1 for sprites.
- cc(b: _typing.ReadableBuffer) None ¶
Append bytes to the command FIFO.
- Paramètres:
b (ReadableBuffer) – The bytes to add
- AlphaFunc(func: int, ref: int) None ¶
Set the alpha test function
- Paramètres:
These values are part of the graphics context and are saved and restored by
SaveContext()
andRestoreContext()
.
- Begin(prim: int) None ¶
Begin drawing a graphics primitive
- Paramètres:
prim (int) – graphics primitive.
Valid primitives are
BITMAPS
,POINTS
,LINES
,LINE_STRIP
,EDGE_STRIP_R
,EDGE_STRIP_L
,EDGE_STRIP_A
,EDGE_STRIP_B
andRECTS
.
- BitmapExtFormat(format: int) None ¶
Set the bitmap format
- Paramètres:
format (int) – bitmap pixel format.
- BitmapHandle(handle: int) None ¶
Set the bitmap handle
- Paramètres:
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()
andRestoreContext()
.
- BitmapLayoutH(linestride: int, height: int) None ¶
Set the source bitmap memory format and layout for the current handle. high bits for large bitmaps
- BitmapLayout(format: int, linestride: int, height: int) None ¶
Set the source bitmap memory format and layout for the current handle
- BitmapSizeH(width: int, height: int) None ¶
Set the screen drawing of bitmaps for the current handle. high bits for large bitmaps
- BitmapSize(filter: int, wrapx: int, wrapy: int, width: int, height: int) None ¶
Set the screen drawing of bitmaps for the current handle
- Paramètres:
filter (int) – bitmap filtering mode, one of
NEAREST
orBILINEAR
. Range 0-1wrapx (int) – bitmap \(x\) wrap mode, one of
REPEAT
orBORDER
. Range 0-1wrapy (int) – bitmap \(y\) wrap mode, one of
REPEAT
orBORDER
. Range 0-1width (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
- Paramètres:
addr (int) – Bitmap start address, pixel-aligned. May be in SRAM or flash. Range 0-16777215
- BitmapSwizzle(r: int, g: int, b: int, a: int) None ¶
Set the source for the r,g,b and a channels of a bitmap
- BitmapTransformA(p: int, v: int) None ¶
Set the \(a\) component of the bitmap transform matrix
- Paramètres:
The initial value is p = 0, v = 256. This represents the value 1.0.
These values are part of the graphics context and are saved and restored by
SaveContext()
andRestoreContext()
.
- BitmapTransformB(p: int, v: int) None ¶
Set the \(b\) component of the bitmap transform matrix
- Paramètres:
The initial value is p = 0, v = 0. This represents the value 0.0.
These values are part of the graphics context and are saved and restored by
SaveContext()
andRestoreContext()
.
- BitmapTransformC(v: int) None ¶
Set the \(c\) component of the bitmap transform matrix
- Paramètres:
v (int) – The \(c\) component of the bitmap transform matrix, in signed 15.8 bit fixed-point form. Range 0-16777215. The initial value is 0
This value is part of the graphics context and is saved and restored by
SaveContext()
andRestoreContext()
.
- BitmapTransformD(p: int, v: int) None ¶
Set the \(d\) component of the bitmap transform matrix
- Paramètres:
The initial value is p = 0, v = 0. This represents the value 0.0.
These values are part of the graphics context and are saved and restored by
SaveContext()
andRestoreContext()
.
- BitmapTransformE(p: int, v: int) None ¶
Set the \(e\) component of the bitmap transform matrix
- Paramètres:
The initial value is p = 0, v = 256. This represents the value 1.0.
These values are part of the graphics context and are saved and restored by
SaveContext()
andRestoreContext()
.
- BitmapTransformF(v: int) None ¶
Set the \(f\) component of the bitmap transform matrix
- Paramètres:
v (int) – The \(f\) component of the bitmap transform matrix, in signed 15.8 bit fixed-point form. Range 0-16777215. The initial value is 0
This value is part of the graphics context and is saved and restored by
SaveContext()
andRestoreContext()
.
- BlendFunc(src: int, dst: int) None ¶
Set pixel arithmetic
- Paramètres:
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()
andRestoreContext()
.
- Call(dest: int) None ¶
Execute a sequence of commands at another location in the display list
- Paramètres:
dest (int) – display list address. Range 0-65535
- Cell(cell: int) None ¶
Set the bitmap cell number for the vertex2f command
- Paramètres:
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()
andRestoreContext()
.
- ClearColorA(alpha: int) None ¶
Set clear value for the alpha channel
- Paramètres:
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()
andRestoreContext()
.
- ClearColorRGB(red: int, green: int, blue: int) None ¶
Set clear values for red, green and blue channels
- Paramètres:
These values are part of the graphics context and are saved and restored by
SaveContext()
andRestoreContext()
.
- ClearStencil(s: int) None ¶
Set clear value for the stencil buffer
- Paramètres:
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()
andRestoreContext()
.
- ClearTag(s: int) None ¶
Set clear value for the tag buffer
- Paramètres:
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()
andRestoreContext()
.
- ColorA(alpha: int) None ¶
Set the current color alpha
- Paramètres:
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()
andRestoreContext()
.
- ColorMask(r: int, g: int, b: int, a: int) None ¶
Enable and disable writing of frame buffer color components
- Paramètres:
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()
andRestoreContext()
.
- ColorRGB(red: int, green: int, blue: int) None ¶
Set the drawing color
- Paramètres:
These values are part of the graphics context and are saved and restored by
SaveContext()
andRestoreContext()
.
- End() None ¶
End drawing a graphics primitive
Vertex2ii()
andVertex2f()
calls are ignored until the nextBegin()
.
- Jump(dest: int) None ¶
Execute commands at another location in the display list
- Paramètres:
dest (int) – display list address. Range 0-65535
- Macro(m: int) None ¶
Execute a single command from a macro register
- Paramètres:
m (int) – macro register to read. Range 0-1
- PaletteSource(addr: int) None ¶
Set the base address of the palette
- Paramètres:
addr (int) – Address in graphics SRAM, 2-byte aligned. Range 0-4194303. The initial value is 0
This value is part of the graphics context and is saved and restored by
SaveContext()
andRestoreContext()
.
- ScissorSize(width: int, height: int) None ¶
Set the size of the scissor clip rectangle
- Paramètres:
These values are part of the graphics context and are saved and restored by
SaveContext()
andRestoreContext()
.
- ScissorXY(x: int, y: int) None ¶
Set the top left corner of the scissor clip rectangle
- Paramètres:
These values are part of the graphics context and are saved and restored by
SaveContext()
andRestoreContext()
.
- StencilFunc(func: int, ref: int, mask: int) None ¶
Set function and reference value for stencil testing
- Paramètres:
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()
andRestoreContext()
.
- StencilMask(mask: int) None ¶
Control the writing of individual bits in the stencil planes
- Paramètres:
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()
andRestoreContext()
.
- StencilOp(sfail: int, spass: int) None ¶
Set stencil test actions
- Paramètres:
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()
andRestoreContext()
.
- TagMask(mask: int) None ¶
Control the writing of the tag buffer
- Paramètres:
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()
andRestoreContext()
.
- Tag(s: int) None ¶
Set the current tag value
- Paramètres:
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()
andRestoreContext()
.
- Vertex2ii(x: int, y: int, handle: int, cell: int) None ¶
- Paramètres:
This method is an alternative to
Vertex2f()
.
- LineWidth(width: float) None ¶
Set the width of rasterized lines
- Paramètres:
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()
andRestoreContext()
.
- PointSize(size: float) None ¶
Set the diameter of rasterized points
- Paramètres:
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()
andRestoreContext()
.
- VertexTranslateX(x: float) None ¶
Set the vertex transformation’s x translation component
- Paramètres:
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()
andRestoreContext()
.
- VertexTranslateY(y: float) None ¶
Set the vertex transformation’s y translation component
- Paramètres:
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()
andRestoreContext()
.
- VertexFormat(frac: int) None ¶
Set the precision of vertex2f coordinates
- Paramètres:
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()
andRestoreContext()
.
- cmd0(n: int) None ¶
Append the command word n to the FIFO
- Paramètres:
n (int) – The command code
This method is used by the
eve
module to efficiently add commands to the FIFO.