mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-05 21:57:20 +00:00
Removed unused functions subclip/backclip.
This commit is contained in:
parent
4486ccdd29
commit
87ba1dba88
@ -239,52 +239,6 @@ void simple_dotted_mode(BITMAP* bmp, int fg, int bg)
|
||||
drawing_mode(DRAW_MODE_COPY_PATTERN, pattern, 0, 0);
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
/* Set/Restore sub-clip regions */
|
||||
|
||||
struct CLIP_DATA
|
||||
{
|
||||
BITMAP* bmp;
|
||||
int cl, ct, cr, cb;
|
||||
};
|
||||
|
||||
void* subclip(BITMAP* bmp, int x1, int y1, int x2, int y2)
|
||||
{
|
||||
int cl, ct, cr, cb;
|
||||
CLIP_DATA* data;
|
||||
|
||||
cl = bmp->cl;
|
||||
ct = bmp->ct;
|
||||
cr = bmp->cr;
|
||||
cb = bmp->cb;
|
||||
|
||||
if ((x2 < cl) || (x1 >= cr) || (y2 < ct) || (y1 >= cb))
|
||||
return NULL;
|
||||
|
||||
x1 = MID(cl, x1, cr-1);
|
||||
y1 = MID(ct, y1, cb-1);
|
||||
x2 = MID(x1, x2, cr-1);
|
||||
y2 = MID(y1, y2, cb-1);
|
||||
|
||||
set_clip(bmp, x1, y1, x2, y2);
|
||||
|
||||
data = new CLIP_DATA;
|
||||
data->bmp = bmp;
|
||||
data->cl = cl;
|
||||
data->ct = ct;
|
||||
data->cr = cr;
|
||||
data->cb = cb;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void backclip(void* _data)
|
||||
{
|
||||
CLIP_DATA* data = reinterpret_cast<CLIP_DATA*>(_data);
|
||||
set_clip(data->bmp, data->cl, data->ct, data->cr, data->cb);
|
||||
delete data;
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
/* Rectangle Tracker (Save/Restore rectangles from/to the screen) */
|
||||
|
||||
|
@ -104,9 +104,6 @@ BITMAP* get_gfx(int id);
|
||||
void dotted_mode(int offset);
|
||||
void simple_dotted_mode(BITMAP* bmp, int fg, int bg);
|
||||
|
||||
void *subclip(BITMAP* bmp, int x1, int y1, int x2, int y2);
|
||||
void backclip(void *data);
|
||||
|
||||
RectTracker *rect_tracker_new(BITMAP* bmp, int x1, int y1, int x2, int y2);
|
||||
void rect_tracker_free(RectTracker *tracker);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user