simon-git: puzzles (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Fri Sep 29 17:57:45 BST 2017
TL;DR:
a0435df draw_thick_line: Bound thickness by 1.0 below
9b0069b tracks: Scale thickness of "no track here" crosses
05938e1 tracks: Roughly double the thickness of the "no track" crosses
c2a8a60 Fix a typo in devel.but.
74aff67 tracks: thicken the lines of the grid itself.
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2017-09-29 17:57:45
commit a0435df8aa30af4ea24b4b375bc1e37600bc19fe
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=a0435df8aa30af4ea24b4b375bc1e37600bc19fe;hp=df3b9cb845d5641dab16cbe071dca0ac2b7a97fb
Author: Ian Jackson <ijackson at chiark.greenend.org.uk>
Date: Fri Sep 29 14:29:56 2017 +0100
draw_thick_line: Bound thickness by 1.0 below
A line less than 1 pixel wide may not be visible. So if a backend
wants to draw a line whose width scaled by the window size, that line
thickness ought to be at least 1.0.
That way if the scale is small, but still big enough that there is a
straightforward interpretation of the drawing primitives which is
legible, we implement that interpretation.
If a frontend draws a narrower line, making it wider might cause
drawing anomalies, due to the line now having a bigger bounding box.
These anomalies should occur only at small scales where currently the
display is not legible, and we should fix them as we notice them.
Signed-off-by: Ian Jackson <ijackson at chiark.greenend.org.uk>
devel.but | 3 +++
drawing.c | 2 ++
2 files changed, 5 insertions(+)
commit 9b0069b1379f6468a797a886a8520baf57b0fa9f
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=9b0069b1379f6468a797a886a8520baf57b0fa9f;hp=a0435df8aa30af4ea24b4b375bc1e37600bc19fe
Author: Ian Jackson <ijackson at chiark.greenend.org.uk>
Date: Fri Sep 29 14:29:57 2017 +0100
tracks: Scale thickness of "no track here" crosses
Simply replace the calls to draw_line with calls to draw_thick_line.
We need to choose a thickness parameter. The preferred tile size is
30, and the "draw_line" function draws a 1-pixel line, so the
thickness right now is 1/30 the tile size, at the preferred size.
Signed-off-by: Ian Jackson <ijackson at chiark.greenend.org.uk>
tracks.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
commit 05938e1f64bccaa7019a2aee48d82092df533362
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=05938e1f64bccaa7019a2aee48d82092df533362;hp=9b0069b1379f6468a797a886a8520baf57b0fa9f
Author: Ian Jackson <ijackson at chiark.greenend.org.uk>
Date: Fri Sep 29 14:29:58 2017 +0100
tracks: Roughly double the thickness of the "no track" crosses
The default of 1/30 is rather thin, and probably wasn't chosen
deliberately (since it was just inherited from the default 1-pixel
line width, and the preferred tile size).
Thicker crosses stand out more and make play easier.
Use 1/16 since it's a rounder number than 1/15 :-).
Signed-off-by: Ian Jackson <ijackson at chiark.greenend.org.uk>
tracks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit c2a8a60a09165c0da6e2cd1faad2905ecff1e995
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=c2a8a60a09165c0da6e2cd1faad2905ecff1e995;hp=05938e1f64bccaa7019a2aee48d82092df533362
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Sep 29 17:07:08 2017 +0100
Fix a typo in devel.but.
devel.but | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 74aff6741b50c58c71527a0524e3f6b081a2da7e
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=74aff6741b50c58c71527a0524e3f6b081a2da7e;hp=c2a8a60a09165c0da6e2cd1faad2905ecff1e995
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Sep 29 17:22:56 2017 +0100
tracks: thicken the lines of the grid itself.
Since these lines are always orthogonal, it's easier to draw them
using draw_rect than draw_thick_line.
Previously, the grid lines were drawn just inside the top and left
edges of the region redrawn by draw_square(), so only the bottom and
right edges of the whole grid were not covered by any draw_square
call. To avoid having to shift the logical grid centre, I'm now
drawing parts of the grid outline on all four sides of the
draw_square() region, so that half the thickened grid edge protrudes
on every side of the grid as a whole.
In the process of splitting up the grid line width into the part on
the top and left edges and the part on the bottom and right, I've
renamed the confusingly named BORDER_WIDTH define (which wasn't used
anyway) to a set of things that make it clear that they're referring
to the grid lines as opposed to the border of the whole puzzle.
tracks.c | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)
More information about the tartarus-commits
mailing list