Fullscreen canvas? #344
-
Hello, I am searching for a possibility to draw a full-screen canvas, but I am running into some issues. I am instantiating an Once the first event (keypress,...) is registered, the canvas resizes (from 0/0), but it's less than expected - on the horizontal, I'd estimate it's half of the full screen, on the vertical, it's hard to say - maybe a fourth? I also tried playing around with Any help would be much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
When using braille characters, we can display:
What about using: auto component = Renderer([] {
auto my_image = canvas([] (Canvas& c) {
c.DrawPointLine(0, 0, canvas.width(), canvas.height());
c.DrawText(0, 0, "width = " + std::to_string(canvas.width()));
c.DrawText(0, 2, "height = " + std::to_string(canvas.height()));
});
return my_image | flex;
}
auto screen = ScreenInteractive::Fullscreen(); This create a component, that will display a canvas "flexible", taking the whole size of the screen. |
Beta Was this translation helpful? Give feedback.
When using braille characters, we can display:
This explains why you see a difference of coordinate/size differences. The canvas uses a coordinate system scaled by 2x4.
What about using:
This create a component, that will display a canvas "flexible", taking the whole size of …