Scaling starts to the edge to avoid bucket Fill spill over.

This commit is contained in:
William Kendrick 2009-10-11 18:22:50 +00:00
parent 56205ba9c8
commit 4db3e359fb
3 changed files with 10 additions and 3 deletions

View file

@ -40,6 +40,12 @@ $Id$
* Starter images can be in SVG (Scalable Vector Graphics) format.
(Avoids loading PNG if SVG with the same name exists.)
* When scaling/smearing a picture or Starter, to fit the current canvas
size, it was not drawing on the far right or bottom edges, causing
Fill tool to 'spill'. (Example: fill one of the puzzle pieces on the
right or bottom of the 5x5 jigsaw Starter, and all pieces on the right
and bottom would get filled, too.)
* Starter images can be in KPX (Kid Pix Template) format.
(These appear to simply be JPEG with 60 byte's worth of Mac OS
resource fork header at the beginning.)

View file

@ -254,7 +254,7 @@ int compare_ftw_str(const void *v1, const void *v2)
{
const char *restrict const s1 = ((tp_ftw_str *) v1)->str;
const char *restrict const s2 = ((tp_ftw_str *) v2)->str;
return -strcmp(s1, s2);
return -strcmp(s1, s2); /* FIXME: Should we try strcasecmp, to group things together despite uppercase/lowercase in filenames (e.g., Jigsaw* vs jigsaw* Starters)??? -bjk 2009.10.11 */
}
void tp_ftw(SDL_Surface * screen, char *restrict const dir, unsigned dirlen,

View file

@ -22,7 +22,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
June 14, 2002 - October 9, 2009
June 14, 2002 - October 11, 2009
$Id$
*/
@ -11890,9 +11890,10 @@ static int SDLCALL NondefectiveBlit(SDL_Surface * src, SDL_Rect * srcrect,
}
if (srcw < 1 || srch < 1)
return -1; /* no idea what to return if nothing done */
srch++; /* "++" is a tweak to get to edges -bjk 2009.10.11 */
while (srch--)
{
int i = srcw;
int i = srcw + 1; /* "+ 1" is a tweak to get to edges -bjk 2009.10.11 */
while (i--)
{
putpixel(dst, i + dstx, srch + dsty,