Mend render bug introduced to Perspective tool
This commit is contained in:
parent
e9001c9fac
commit
94a2b9caf5
2 changed files with 70 additions and 67 deletions
|
|
@ -7,7 +7,7 @@ Various contributors (see below, and AUTHORS.txt)
|
||||||
http://www.tuxpaint.org/
|
http://www.tuxpaint.org/
|
||||||
|
|
||||||
|
|
||||||
2022.April.22 (0.9.28)
|
2022.May.4 (0.9.28)
|
||||||
* Improvements to "Paint" and "Lines" tools:
|
* Improvements to "Paint" and "Lines" tools:
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
* Brush spacing may now be altered within Tux Paint.
|
* Brush spacing may now be altered within Tux Paint.
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
(See COPYING.txt)
|
(See COPYING.txt)
|
||||||
|
|
||||||
Last updated: January 30, 2022
|
Last updated: May 4, 2022
|
||||||
$Id$
|
$Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -435,16 +435,21 @@ void perspective_click(magic_api * api, int which, int mode ATTRIBUTE_UNUSED,
|
||||||
void perspective_release(magic_api * api, int which,
|
void perspective_release(magic_api * api, int which,
|
||||||
SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect)
|
SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect)
|
||||||
{
|
{
|
||||||
switch (which)
|
if (which == TOOL_PANELS)
|
||||||
{
|
return;
|
||||||
case TOOL_PERSPECTIVE:
|
|
||||||
|
update_rect->x = update_rect->y = 0;
|
||||||
|
update_rect->w = canvas->w;
|
||||||
|
update_rect->h = canvas->h;
|
||||||
|
|
||||||
|
if (which != TOOL_TILEZOOM)
|
||||||
|
SDL_FillRect(canvas, update_rect, SDL_MapRGB(canvas->format, perspective_r, perspective_g, perspective_b));
|
||||||
|
|
||||||
|
if (which == TOOL_PERSPECTIVE)
|
||||||
{
|
{
|
||||||
perspective_preview(api, which, canvas, last, x, y, update_rect, 0.5);
|
perspective_preview(api, which, canvas, last, x, y, update_rect, 0.5);
|
||||||
}
|
}
|
||||||
break;
|
else
|
||||||
|
|
||||||
case TOOL_ZOOM:
|
|
||||||
case TOOL_TILEZOOM:
|
|
||||||
{
|
{
|
||||||
SDL_Surface *aux_surf;
|
SDL_Surface *aux_surf;
|
||||||
SDL_Surface *scaled_surf;
|
SDL_Surface *scaled_surf;
|
||||||
|
|
@ -513,8 +518,6 @@ void perspective_release(magic_api * api, int which,
|
||||||
update_rect->h = canvas->h;
|
update_rect->h = canvas->h;
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void perspective_preview(magic_api * api, int which,
|
void perspective_preview(magic_api * api, int which,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue