mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Couple of minor updates to restore accuracy.
[originally from svn r6268]
This commit is contained in:
17
devel.but
17
devel.but
@ -1551,14 +1551,13 @@ functions. This enables a single front end to switch between
|
|||||||
multiple implementations of the drawing API if necessary. For
|
multiple implementations of the drawing API if necessary. For
|
||||||
example, the Windows API supplies a printing mechanism integrated
|
example, the Windows API supplies a printing mechanism integrated
|
||||||
into the same GDI which deals with drawing in windows, and therefore
|
into the same GDI which deals with drawing in windows, and therefore
|
||||||
it is likely (although as yet unimplemented in Puzzles) that the
|
the same API implementation can handle both drawing and printing;
|
||||||
same API implementation can handle both drawing and printing; but on
|
but on Unix, the most common way for applications to print is by
|
||||||
Unix, the most common way for applications to print is by producing
|
producing PostScript output directly, and although it would be
|
||||||
PostScript output directly, and although it would be \e{possible} to
|
\e{possible} to write a single (say) \cw{draw_rect()} function which
|
||||||
write a single (say) \cw{draw_rect()} function which checked a
|
checked a global flag to decide whether to do GTK drawing operations
|
||||||
global flag to decide whether to do GTK drawing operations or output
|
or output PostScript to a file, it's much nicer to have two separate
|
||||||
PostScript to a file, it's much nicer to have two separate functions
|
functions and switch between them as appropriate.
|
||||||
and switch between them as appropriate.
|
|
||||||
|
|
||||||
When drawing, the puzzle window is indexed by pixel coordinates,
|
When drawing, the puzzle window is indexed by pixel coordinates,
|
||||||
with the top left pixel defined as \cw{(0,0)} and the bottom right
|
with the top left pixel defined as \cw{(0,0)} and the bottom right
|
||||||
@ -4051,7 +4050,7 @@ Then the main redraw loop will look something like this
|
|||||||
\c if (x == ui->cursor_x && y == ui->cursor_y)
|
\c if (x == ui->cursor_x && y == ui->cursor_y)
|
||||||
\c value |= CURSOR;
|
\c value |= CURSOR;
|
||||||
\c if (ds->symbol_at_position[y][x] != value) {
|
\c if (ds->symbol_at_position[y][x] != value) {
|
||||||
\c symbol_drawing_subroutine(fe, ds, x, y, value);
|
\c symbol_drawing_subroutine(dr, ds, x, y, value);
|
||||||
\c ds->symbol_at_position[y][x] = value;
|
\c ds->symbol_at_position[y][x] = value;
|
||||||
\c }
|
\c }
|
||||||
\c }
|
\c }
|
||||||
|
Reference in New Issue
Block a user