Skip to content

Fullscreen canvas? #344

Discussion options

You must be logged in to vote

When using braille characters, we can display:

  • 1x1 cells per cells
  • 1x2 blocks by cells
  • 2x4 brailles dot per cells.
    This explains why you see a difference of coordinate/size differences. The canvas uses a coordinate system scaled by 2x4.

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 …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tobi-wan-kenobi
Comment options

@ArthurSonzogni
Comment options

Answer selected by tobi-wan-kenobi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants