/// <summary>Renders display data on the display device.</summary> /// <param name="bitmap">The bitmap object to render on the display.</param> /// <param name="x">The start x coordinate of the dirty area.</param> /// <param name="y">The start y coordinate of the dirty area.</param> /// <param name="width">The width of the dirty area.</param> /// <param name="height">The height of the dirty area.</param> protected override void Paint(Bitmap bitmap, int x, int y, int width, int height) { try { if (Mainboard.NativeBitmapCopyToSpi != null) { this.SetClippingArea(x, y, width - 1, height - 1); this.WriteCommand(0x2C); this.rsPin.Write(true); Mainboard.NativeBitmapCopyToSpi(bitmap, this.netMFSpiConfig, x, y, width, height, GT.Mainboard.BPP.BPP16_BGR_BE); } else { this.Draw(bitmap); } } catch { this.ErrorPrint("Painting error"); } }
/// <summary> /// Renders Bitmap data on the display device. /// </summary> /// <param name="bitmap">The <see cref="T:Microsoft.SPOT.Bitmap"/> object to render on the display.</param> protected override void Paint(Bitmap bitmap, int x, int y, int width, int height) { try { if (Mainboard.NativeBitmapCopyToSpi != null) { SetClippingArea(0, 0, bitmap.Width - 1, bitmap.Height - 1); WriteCommand(0x2C); pinDC.Write(true); Mainboard.NativeBitmapCopyToSpi(bitmap, netMFSpiConfig, 0, 0, bitmap.Width, bitmap.Height, GT.Mainboard.BPP.BPP16_BGR_BE); } else { Draw(bitmap); } } catch { ErrorPrint("Painting error"); } }
/// <summary> /// Renders Bitmap data on the display device. /// </summary> /// <param name="bitmap">The <see cref="T:Microsoft.SPOT.Bitmap"/> object to render on the display.</param> protected override void Paint(Bitmap bitmap) { try { if (Mainboard.NativeBitmapCopyToSpi != null) { this.SetClippingArea(0, 0, (uint)bitmap.Width - 1, (uint)bitmap.Height - 1); this.WriteCommand(0x2C); this.rs.Write(true); Mainboard.NativeBitmapCopyToSpi(bitmap, this.netMFSpiConfig, 0, 0, bitmap.Width, bitmap.Height, GT.Mainboard.BPP.BPP16_BGR_BE); } else { this.Draw(bitmap); } } catch { this.ErrorPrint("Painting error"); } }