예제 #1
0
    def prepare_for_grid(self):
        char_width = int(15 * self.local_scale)
        char_height = int(32 * self.local_scale)

        params = char_width, char_height, self.terminal_width, self.num_rows
        if params in self.console_grid_dict:
            geom = self.console_grid_dict.get(params)
        else:
            geom = get_console_grid(char_width, char_height, self.terminal_width, self.num_rows)
            self.console_grid_dict[params] = geom

        return geom
예제 #2
0
 def prepare_for_grid(self):
     char_width = int(15 * self.local_scale)
     char_height = int(32 * self.local_scale)
     return get_console_grid(char_width, char_height, self.terminal_width,
                             self.num_rows)