mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
New puzzle: `Tents'. Requires a potentially shared algorithms module
maxflow.c. Also in this checkin, fixes to the OS X and GTK back ends to get ALIGN_VNORMAL right. This is the first time I've used it! :-) [originally from svn r6390]
This commit is contained in:
4
gtk.c
4
gtk.c
@ -290,6 +290,8 @@ void gtk_draw_text(void *handle, int x, int y, int fonttype, int fontsize,
|
||||
|
||||
if (align & ALIGN_VCENTRE)
|
||||
rect.y -= rect.height / 2;
|
||||
else
|
||||
rect.y -= rect.height;
|
||||
|
||||
if (align & ALIGN_HCENTRE)
|
||||
rect.x -= rect.width / 2;
|
||||
@ -317,6 +319,8 @@ void gtk_draw_text(void *handle, int x, int y, int fonttype, int fontsize,
|
||||
&lb, &rb, &wid, &asc, &desc);
|
||||
if (align & ALIGN_VCENTRE)
|
||||
y += asc - (asc+desc)/2;
|
||||
else
|
||||
y += asc;
|
||||
|
||||
/*
|
||||
* ... but horizontal extents with respect to the provided
|
||||
|
Reference in New Issue
Block a user