Brush container (unfinished). Temporarily bound to right-click 'Brush FX'. Only accepts monochrome brushes of any size at the moment.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@997 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2009-08-18 23:42:07 +00:00
parent c957107d85
commit 29ee887c78
9 changed files with 236 additions and 12 deletions

22
init.c
View File

@@ -1063,7 +1063,7 @@ void Init_buttons(void)
106,18,
16,16,
BUTTON_SHAPE_RECTANGLE,
Button_Brush_FX,Button_Brush_FX,
Button_Brush_FX,Button_Brush_container,
Do_nothing,
FAMILY_INSTANT);
@@ -2446,3 +2446,23 @@ void Init_sighandler(void)
#endif
}
void Init_brush_container(void)
{
int i;
for (i=0; i<BRUSH_CONTAINER_COLUMNS*BRUSH_CONTAINER_ROWS; i++)
{
int x,y;
Brush_container[i].Paintbrush_shape=PAINTBRUSH_SHAPE_MAX;
Brush_container[i].Width=0;
Brush_container[i].Height=0;
memset(Brush_container[i].Palette,sizeof(T_Palette),0);
Brush_container[i].Transp_color=0;
for (y=0; y<BRUSH_CONTAINER_PREVIEW_WIDTH; y++)
for (x=0; x<BRUSH_CONTAINER_PREVIEW_HEIGHT; x++)
Brush_container[i].Thumbnail[y][x]=0;
Brush_container[i].Brush = NULL;
}
}