From f0e9d7b8c3c1d49829874b1d291e7fc234d50324 Mon Sep 17 00:00:00 2001 From: Albert Cahalan Date: Thu, 25 Nov 2004 06:45:03 +0000 Subject: [PATCH] fix and document the scale keyword --- docs/CHANGES.txt | 1 + docs/html/README.html | 17 +++++++++++++++++ src/tuxpaint.c | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index b9fc7aa60..d1a38fa10 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -12,6 +12,7 @@ http://www.newbreedsoftware.com/tuxpaint/ Albert Cahalan * Added "scale" keyword (*.dat files) for high-resolution stamp images. + Fixed it later; had ":" and "/" flipped around. Documented it. Albert Cahalan * Can now use pretty much any window size, like 1234x666. diff --git a/docs/html/README.html b/docs/html/README.html index c053c9069..6a63923f3 100644 --- a/docs/html/README.html +++ b/docs/html/README.html @@ -1220,6 +1220,23 @@ New Breed Software

"nomirror" to the stamp's data file.

+

Initial Stamp Size

+
+

By default, Tux Paint assumes that your stamp is sized + appropriately for unscaled display on a 608x472 canvas. This is + the original Tux Paint canvas size, provided by a 640x480 screen. + Tux Paint will then adjust the stamp according to the current + canvas size and, if enabled, the user's stamp size controls.

+ +

If your stamp would be too big or too small, you can specify + a scale factor. If your stamp would be 2.5 times as wide (or tall) + as it should be, add the option "scale 40%" or + "scale 5/2" or "scale 2.5" + or "scale 2:5" to your image. You may include + an "=" if you wish, as in + "scale=40%".

+
+

Windows Users

diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 098a5e256..a210d11c0 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -8547,7 +8547,7 @@ static info_type * loadinfo(const char * const fname) if (tmp > 0.0001 && tmp < 10000.0) inf.ratio = tmp; } - else if (strchr(cp,':')) + else if (strchr(cp,'/')) { tmp = strtod(cp,&cp); while(*cp && !isdigit(*cp)) @@ -8556,7 +8556,7 @@ static info_type * loadinfo(const char * const fname) if (tmp>0.0001 && tmp<10000.0 && tmp2>0.0001 && tmp2<10000.0 && tmp/tmp2>0.0001 && tmp/tmp2<10000.0) inf.ratio = tmp/tmp2; } - else if (strchr(cp,'/')) + else if (strchr(cp,':')) { tmp = strtod(cp,&cp); while(*cp && !isdigit(*cp))