Package ilcd
Class Draw

Public Method write1D2DRunLengthEncodedScanLine

static void write1D2DRunLengthEncodedScanLine(int prevLineOffset, int noOfPixels, int noOfRleBytes, byte[] data)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Parameter Range Description
prevLineOffset -8 ... 8 y-offset of scanline referred to (0 = none = 1D encoded)
noOfPixels 1 ... display width number of pixels to write
noOfRleBytes 2 ... display width + 2 length of encoded data in bytes
data 0x00 ... 0xFF array storing run length encoded data

Writes a horizontal scan line consisting of noOfPixels pixels onto the screen. The noOfRleBytes long data is sent with run-length encoding.

Note

There is also a local 2D Run-Length Encoding Application Note version available which is named as 2D RLE Application Note.pdf, and can be found under the iLCD Manager XEJoC Manager installation path within the Documentation directory. Other useful pdf documents can be downloaded on the www.demmel.com/en/service/downloads.htm website.

Example

byte[] data = new byte[] { (byte) 0xB1 , 0x1F, 0x00 };

Draw.write1D2DRunLengthEncodedScanLine(0, 50, 3, data);

This example will write 50 blue pixels to the screen, starting from the current cursor position. The encoded data consists of 3 bytes: 0xB1 indicates a horizontal repetition (bit 7 set) of 50 pixels and 0x1F00 is the 16-bit color value for pure blue.

See also:

Draw.read1D2DRunLengthEncodedScanLine(int, int)
Draw.writeScanLine(int, short[])
Draw.readScanLine(int)
16-Bit Color Values