We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This happens on all existing targets/display controller Otm8009a , ILL9341 and ST7789V
ILL9341 and ST7789V use same code.
Noticed when testing Tetris application. As soon as start play half the display is Corrupted
Latest graphics firmware versions.
This looks like a problem with the BitBlt() method not working with start positions and widths that are not a full screen
To show problem I created a test program(See below) that draws a rectangle on 4 corners of display. Then flushes each out individually
All rectangles should be shown correctly when each flushed
After full screen flush -OK
After just flushing first rectangle, top left
using System; using System.Threading; using nanoFramework.UI; using nanoFramework.Presentation.Media; namespace TestFlush { public class Program { static int height; static int width; static int qw; static int qh; static int px1; static int px2; static int py1; static int py2; public static void Main() { DisplayControl dc = new DisplayControl(); // Init positions height = dc.ShorterSide; width = dc.LongerSide; // Rectangle size qw = width / 4; qh = height / 4; // Start Positions px1 = 5; px2 = width - qw - 5; py1 = 5; py2 = height -qh - 5; try { Bitmap fullScreenBitmap = new Bitmap(width, height); while (true) { // Clear display ClearDisplay(fullScreenBitmap); // Show rectangles as full screen DrawRectangles(fullScreenBitmap); fullScreenBitmap.Flush(); // OK Thread.Sleep(4000); ClearDisplay(fullScreenBitmap); // Draw all rectangles on full screen DrawRectangles(fullScreenBitmap); // Flush each rectangle separately ( partial flush) // top left fullScreenBitmap.Flush(px1, py1, qw, qh); Thread.Sleep(1000); // Top right fullScreenBitmap.Flush(px2, py1, qw, qh); Thread.Sleep(1000); // bottom left fullScreenBitmap.Flush(px1, py2, qw, qh); Thread.Sleep(1000); // bottom right fullScreenBitmap.Flush(px2, py2, qw, qh); Thread.Sleep(5000); } } catch (Exception) { } Thread.Sleep(Timeout.Infinite); } static void ClearDisplay(Bitmap fullScreenBitmap) { fullScreenBitmap.Clear(); fullScreenBitmap.Flush(); } static void DrawRectangles( Bitmap fullScreenBitmap) { // top left fullScreenBitmap.DrawRectangle(Color.Red, 1, px1, py1, qw, qh, 1, 1, Color.Black, 0, 0, Color.Black, 0, 0, 0); // Top right fullScreenBitmap.DrawRectangle(Color.Blue, 1, px2, py1, qw, qh, 1, 1, Color.Black, 0, 0, Color.Black, 0, 0, 0); // Bottom left fullScreenBitmap.DrawRectangle(Color.Green, 1, px1, py2, qw, qh, 1, 1, Color.Black, 0, 0, Color.Black, 0, 0, 0); // Bottom right fullScreenBitmap.DrawRectangle(Color.HotPink, 1, px2, py2, qw, qh, 1, 1, Color.Black, 0, 0, Color.Black, 0, 0, 0); } } }
The text was updated successfully, but these errors were encountered:
This is a problem with the bitBlt code not taking into account of partial windows to display
Sorry, something went wrong.
AdrianSoundy
Successfully merging a pull request may close this issue.
Description
This happens on all existing targets/display controller Otm8009a , ILL9341 and ST7789V
ILL9341 and ST7789V use same code.
Noticed when testing Tetris application. As soon as start play half the display is Corrupted
Latest graphics firmware versions.
This looks like a problem with the BitBlt() method not working with start positions and widths that are not a full screen
To show problem I created a test program(See below) that draws a rectangle on 4 corners of display. Then flushes each out individually
Expected behaviour
All rectangles should be shown correctly when each flushed
Screenshot
After full screen flush -OK

After just flushing first rectangle, top left

The text was updated successfully, but these errors were encountered: