Native Windows printing support, using the infrastructure I put in

place in r6190. I'm quite pleased that I didn't have to modify the
printing infrastructure _at all_ to make this work; the only source
change required outside windows.c was the addition of a trivial
utility function midend_get_params(), and that was for the benefit
of bulk puzzle generation rather than anything to do with actual
printing.

As far as I can tell, all printable puzzles now print almost
indistinguishably from the way they print under Unix. If you look
closely the font is slightly different, and the Windows standard
hatching doesn't seem to be quite as nice as the kind I did by hand
in ps.c (and, particularly annoyingly, hatched areas don't show up
at all for me when I print to a file and use gv, though they come
out fine on the printer itself); but it's all there, and it all
works.

[originally from svn r6193]
[r6190 == af59dcf6858264103bbc621761feee3aed5aaf2a]
This commit is contained in:
Simon Tatham
2005-08-20 15:48:55 +00:00
parent cf224a6556
commit 3bfb9b108e
5 changed files with 668 additions and 74 deletions

View File

@ -204,6 +204,7 @@ midend *midend_new(frontend *fe, const game *ourgame,
const drawing_api *drapi, void *drhandle);
void midend_free(midend *me);
void midend_set_params(midend *me, game_params *params);
game_params *midend_get_params(midend *me);
void midend_size(midend *me, int *x, int *y, int expand);
void midend_new_game(midend *me);
void midend_restart_game(midend *me);
@ -217,7 +218,7 @@ int midend_num_presets(midend *me);
void midend_fetch_preset(midend *me, int n,
char **name, game_params **params);
int midend_wants_statusbar(midend *me);
enum { CFG_SETTINGS, CFG_SEED, CFG_DESC };
enum { CFG_SETTINGS, CFG_SEED, CFG_DESC, CFG_FRONTEND_SPECIFIC };
config_item *midend_get_config(midend *me, int which, char **wintitle);
char *midend_set_config(midend *me, int which, config_item *cfg);
char *midend_game_id(midend *me, char *id);