FabGL
FabGL copied to clipboard
Issue with 1280x720 and canvas
Hi, I write this code:
#include "fabgl.h"
fabgl::VGA16Controller DisplayController;
fabgl::Canvas canvas(&DisplayController);
void setup() {
DisplayController.begin();
DisplayController.setResolution(SVGA_1280x720_60Hz); //VGA_640x480_60Hz
Serial.begin(115200);
canvas.setBrushColor(Color::Blue);
canvas.clear();
canvas.reset();
}
void loop() {
canvas.setPenColor(Color::BrightYellow);
canvas.drawEllipse(640, 350, 640, 480);
Serial.print(DisplayController.getScreenWidth());
Serial.print(" ");
Serial.println(DisplayController.getScreenHeight());
Serial.print(canvas.getWidth());
Serial.print(" ");
Serial.println(canvas.getHeight());
delay(5000);
}
this:
Serial.print(DisplayController.getScreenWidth());
send me this: 1280.
this:
Serial.print(DisplayController.getScreenHeight());
send me this: 720.
And all is correct.
But the canvas send me this resolution 1280x288 and the "blue background" cover only half of the screen. It is a bug?
This is the output screen:
