drawing

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GRAPHICS_WIDTH  = 160
	GRAPHICS_HEIGHT = 144
)

* Size of the screen in pixels

View Source
const (
	SOLID = iota
	OR
	XOR
	AND
)

* Possible drawing modes

View Source
const (
	WHITE = iota
	LTGREY
	DKGREY
	BLACK
)

* Possible drawing colours

View Source
const (
	M_NOFILL = iota
	M_FILL
)

* Possible fill styles for box() and circle()

View Source
const (
	UNSIGNED = iota
	SIGNED
)

* Possible values for signed_value in GPrintln() and GPrintn()

Variables

This section is empty.

Functions

func Box

func Box(x1, y1, x2, y2, style gb.UINT8)

func Circle

func Circle(x, y, radius, style gb.UINT8)

func Color

func Color(foreColor, backColor, mode gb.UINT8)

Color Set the current foreground colour (for pixels), background colour, and draw mode

func DrawImage

func DrawImage(data []gb.UINT8)

DrawImage NONBANKED

func GPrint

func GPrint(str string)

GPrint NONBANKED

Print the string 'str' with no interpretation

func GPrintf

func GPrintf(format string, a ...interface{}) int8

GPrintf Print the formatted string 'fmt' with arguments '...'

func GPrintln

func GPrintln(number int16, radix int8, signedValue int8)

GPrintln Print the long number 'number' in radix 'radix'. signed_value should be set to SIGNED or UNSIGNED depending on whether the number is signed or not

func GPrintn

func GPrintn(number int16, radix int8, signedValue int8)

GPrintn Print the number 'number' as in 'GPrintln'

func GetPix

func GetPix(x, y gb.UINT8) gb.UINT8

GetPix Returns the current colour of the pixel at (x,y)

func GotoGXY

func GotoGXY(x, y gb.UINT8)

GotoGXY Sets the current text position to (x,y). Note that x and y have units of cells (8 pixels)

func Line

func Line(x1, y1, x2, y2 gb.UINT8)

func Plot

func Plot(x, y, color, mode gb.UINT8)

Plot Old style plot - try plot_point()

func PlotPoint

func PlotPoint(x, y gb.UINT8)

PlotPoint Plot a point in the current drawing mode and colour at (x,y)

func SwitchData

func SwitchData(x, y gb.UINT8, src, dst []gb.UINT8)

SwitchData NONBANKED

Exchanges the tile on screen at x,y with the tile pointed by src, original tile not performed in this case. is saved in dst. Both src and dst may be NULL - saving or copying to screen is

func WriteChar

func WriteChar(char rune)

WriteChar Prints the character 'char' in the default font at the current position

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL