Merge branch 'master' into sdl2.0

Merging master 2019-september-24 into sdl2.0 branch
This commit is contained in:
Pere Pujal i Carabantes 2019-09-24 14:52:40 +02:00
commit a1c778135d
52 changed files with 921 additions and 803 deletions

View file

@ -8,7 +8,7 @@
Credits: Andrew Corcoran <akanewbie@gmail.com>
Copyright (c) 2002-2009 by Bill Kendrick and others; see AUTHORS.txt
Copyright (c) 2002-2019 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com
http://www.tuxpaint.org/
@ -27,7 +27,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
Last updated: May 6, 2009
Last updated: August 29, 2019
$Id$
*/
@ -86,9 +86,11 @@ void perspective_line(void *ptr_to_api, int which, SDL_Surface * canvas, SDL_Sur
/* Unused?
static const int perspective_AMOUNT = 300;
static const int perspective_RADIUS = 16;
static const double perspective_SHARPEN = 1.0;
*/
Uint8 perspective_r, perspective_g, perspective_b;
int corner;
int dash;
@ -396,12 +398,10 @@ void perspective_release(magic_api * api, int which,
}
else
{
int aux_x, aux_y, aux_h, aux_w;
int aux_h, aux_w;
aux_h = canvas->h * canvas->h / new_h;
aux_w = canvas->w * aux_h / canvas->h;
aux_x = canvas->w / 2 - aux_w / 2;
aux_y = canvas->h / 2 - aux_h / 2;
update_rect->x = canvas->w / 2 - aux_w / 2;
update_rect->y = canvas->h / 2 - aux_h / 2;