/// <summary> /// Clear the display buffer. /// </summary> public void Clear( ) { var rectangle = new VerticalByteRectangle(0, 0, this.width, this.height); this.SendColPagePreamble(rectangle); var totalBytes = (this.width * this.height) / 8; this.SendCommands(new byte[totalBytes]); //for( int index = 0; index < totalBytes; index++ ) // this.SendCommand( 0 ); }
public void DrawBitmap(int x, int y, VerticalByteBitmap bitmap) { var rectangle = new VerticalByteRectangle(x, y, bitmap.Width, bitmap.Height); this.SendColPagePreamble(rectangle); var buffer = bitmap.ShiftLsbToMsb(rectangle.YOffsetStart); //for( int index = 0; index < buffer.GetLength( 0 ); index++ ) { // this.SendCommands( buffer[ index ] ); //} }
private void SendColPagePreamble(VerticalByteRectangle rectangle) { this.SendCommands(new byte[] { 0x21, ( byte )rectangle.XStart, ( byte )rectangle.XEnd , 0x22, ( byte )rectangle.YByteStart, ( byte )rectangle.YByteEnd }); }