Back to index

These functions let you print pixels and lines to the screen individually. To initalize an 8-Bit Background, see Screen.Load8BitBG() and Screen.Initialize().



Background:SetPaletteColor( colornumber, colorR, colorG, colorB )

You need to set up the palette before drawing to the screen.

colornumber will be used later when printing pixels and lines. It can be any number, just make it unique from other colors in the palette.
colorR, colorG, colorB are the RGB (Red Green Blue) values used to make a color. They can each be a number from 0 to 31. (So that is a maximum of 256 color combinations.)





Background:Plot( x, y, color )

Prints a single pixel to the screen.

x, y are the X and Y coordinates of where to place the pixel on the screen. X can go from 0 to 255, Y can go from 0 to 191.
color is the color number that you used in SetPaletteColor().





Background:Line( x1, y1, x2, y2, color )

Prints a line to the screen.

x1, y1 are the coordinates where the line starts.
x2, y2 are the coordinates where the line ends.
color is the color number that you used in SetPaletteColor().





Background:Clear()

Clears the background of all pixels.





Background:GetPixel( x, y )

Returns the colour of a pixel on an 8-bit background.

x, y are the coordinates of the pixel you want the colour of. The screen dimensions from 0 are 255 by 191 pixels.


Back to index