Skip to content
New issue

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

[canvas-] change mock window size from 80x25 to 1x1 #2171 #2485

Merged
merged 1 commit into from
Oct 6, 2024

Commits on Aug 6, 2024

  1. [canvas-] change mock window size from 80x25 to 1x1 saulpw#2171

    Plotter/Canvas/GraphSheet do not have a screen when __init__() is called.
    Until they have a screen, DrawablePane.windowWidth and .windowHeight
    will give 25 and 80. If the actual terminal is smaller than 80x25.
    errors will be caused by drawing past the edges of the terminal.
    
    This commit uses a temporary size of 1x1 in __init__().
    True canvas dimensions will be calculated later, with the real
    curses screen, by first calling Canvas.refresh(), then waiting
    for the next screen draw. During that draw, the sheet's screen
    will be provided by drawSheet():
    drawSheet(scr, sheet) -> draw(scr) -> render(h, w) -> resetCanvasDimensions(w, h)
    midichef committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    f31f1cb View commit details
    Browse the repository at this point in the history