Dragging with Fisheye didn't work well; only allowing clicks.
Keeping Undo buffer safe from Fisheye.
This commit is contained in:
parent
ab3ed4eecf
commit
fd6554f947
1 changed files with 6 additions and 7 deletions
|
|
@ -102,7 +102,7 @@ void fisheye_draw(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * las
|
||||||
int xx, yy;
|
int xx, yy;
|
||||||
unsigned short int i;
|
unsigned short int i;
|
||||||
|
|
||||||
SDL_BlitSurface(canvas, NULL, last, NULL);
|
/*SDL_BlitSurface(canvas, NULL, last, NULL); */
|
||||||
oryg=SDL_CreateRGBSurface(SDL_ANYFORMAT, 80, 80, canvas->format->BitsPerPixel,
|
oryg=SDL_CreateRGBSurface(SDL_ANYFORMAT, 80, 80, canvas->format->BitsPerPixel,
|
||||||
canvas->format->Rmask, canvas->format->Gmask, canvas->format->Bmask, canvas->format->Amask);
|
canvas->format->Rmask, canvas->format->Gmask, canvas->format->Bmask, canvas->format->Amask);
|
||||||
|
|
||||||
|
|
@ -212,18 +212,17 @@ void fisheye_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||||
SDL_Surface * snapshot, int ox, int oy, int x, int y,
|
SDL_Surface * snapshot, int ox, int oy, int x, int y,
|
||||||
SDL_Rect * update_rect)
|
SDL_Rect * update_rect)
|
||||||
{
|
{
|
||||||
fisheye_draw(api, which, canvas, snapshot, x, y);
|
|
||||||
|
|
||||||
update_rect->x=x-40;
|
|
||||||
update_rect->y=y-40;
|
|
||||||
update_rect->w=update_rect->h=80;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void fisheye_click(magic_api * api, int which, int mode,
|
void fisheye_click(magic_api * api, int which, int mode,
|
||||||
SDL_Surface * canvas, SDL_Surface * last,
|
SDL_Surface * canvas, SDL_Surface * last,
|
||||||
int x, int y, SDL_Rect * update_rect)
|
int x, int y, SDL_Rect * update_rect)
|
||||||
{
|
{
|
||||||
fisheye_drag(api, which, canvas, last, x, y, x, y, update_rect);
|
fisheye_draw(api, which, canvas, last, x, y);
|
||||||
|
|
||||||
|
update_rect->x=x-40;
|
||||||
|
update_rect->y=y-40;
|
||||||
|
update_rect->w=update_rect->h=80;
|
||||||
}
|
}
|
||||||
|
|
||||||
void fisheye_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
void fisheye_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue