Much work on color brushes (issue 362). You can rotate, resize, flip etc. without losing original palette.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1701 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2011-01-30 00:03:38 +00:00
parent e01b310317
commit 5d2dd927e4
8 changed files with 114 additions and 45 deletions

View File

@@ -894,13 +894,17 @@ void Main_handler(void)
break;
case SPECIAL_FLIP_X : // Flip X
Hide_cursor();
Flip_X_lowlevel(Brush, Brush_width, Brush_height);
Flip_X_lowlevel(Brush_original_pixels, Brush_width, Brush_height);
// Remap according to the last used remap table
Remap_general_lowlevel(Brush_colormap,Brush_original_pixels,Brush,Brush_width,Brush_height,Brush_width);
Display_cursor();
action++;
break;
case SPECIAL_FLIP_Y : // Flip Y
Hide_cursor();
Flip_Y_lowlevel(Brush, Brush_width, Brush_height);
Flip_Y_lowlevel(Brush_original_pixels, Brush_width, Brush_height);
// Remap according to the last used remap table
Remap_general_lowlevel(Brush_colormap,Brush_original_pixels,Brush,Brush_width,Brush_height,Brush_width);
Display_cursor();
action++;
break;
@@ -913,6 +917,8 @@ void Main_handler(void)
case SPECIAL_ROTATE_180 : // 180° brush rotation
Hide_cursor();
Rotate_180_deg_lowlevel(Brush, Brush_width, Brush_height);
// Remap according to the last used remap table
Remap_general_lowlevel(Brush_colormap,Brush_original_pixels,Brush,Brush_width,Brush_height,Brush_width);
Brush_offset_X=(Brush_width>>1);
Brush_offset_Y=(Brush_height>>1);
Display_cursor();