New: Picture effects screen, resizes / mirrors / rotates image (Issue 73)

New: Distort brush (Issue 34)
New: Pixel scaler "Triple" for 3x3 zoom (Issue 147)
New: Pixel scaler "Quadruple" for 4x4 zoom (Issue 151)
New: Pixel scaler "Wide2" for 4x2 zoom (Issue 148)
New: Pixel scaler "Tall2" for 2x4 zoom (Issue 149)
Fix of very old bug: Resizing the image didn't mark the image 'modified since last save'

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@763 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2009-05-02 16:44:06 +00:00
parent c1a1d88592
commit e5f948076b
37 changed files with 3952 additions and 481 deletions

View File

@@ -1367,11 +1367,15 @@ void Button_Resolution(void)
char str[5];
T_Special_button * input_width_button, * input_button_height;
T_Dropdown_button * pixel_button;
static const char *pixel_ratio_labels[] ={
"Normal (1x1)",
"Wide (2x1)",
"Tall (1x2)",
"Double (2x2)"};
static const char *pixel_ratio_labels[PIXEL_MAX] ={
"Normal (1x1)",
"Wide (2x1)",
"Tall (1x2)",
"Double (2x2)",
"Triple (3x3)",
"Wide2 (4x2)",
"Tall2 (2x4)",
"Quadruple (4x4)"};
Open_window(299,190,"Picture & screen sizes");
@@ -1423,11 +1427,9 @@ void Button_Resolution(void)
chosen_pixel=Pixel_ratio;
Print_in_window( 12, 57,"Pixel size:" ,MC_Dark,MC_Light);
pixel_button=Window_set_dropdown_button(108,55,14*8,11,14*8,pixel_ratio_labels[Pixel_ratio],1,0,1,LEFT_SIDE|RIGHT_SIDE); // 7
Window_dropdown_add_item(pixel_button,PIXEL_SIMPLE,pixel_ratio_labels[PIXEL_SIMPLE]);
Window_dropdown_add_item(pixel_button,PIXEL_WIDE,pixel_ratio_labels[PIXEL_WIDE]);
Window_dropdown_add_item(pixel_button,PIXEL_TALL,pixel_ratio_labels[PIXEL_TALL]);
Window_dropdown_add_item(pixel_button,PIXEL_DOUBLE,pixel_ratio_labels[PIXEL_DOUBLE]);
pixel_button=Window_set_dropdown_button(108,55,17*8,11,17*8,pixel_ratio_labels[Pixel_ratio],1,0,1,LEFT_SIDE|RIGHT_SIDE); // 7
for (temp=0;temp<PIXEL_MAX;temp++)
Window_dropdown_add_item(pixel_button,temp,pixel_ratio_labels[temp]);
// 10 little buttons for the state of each visible mode
for (temp=0; temp<MODELIST_LINES && temp < Nb_video_modes; temp++)
@@ -3368,22 +3370,17 @@ void Button_Brush_FX(void)
switch (clicked_button)
{
case 2 : // Flip X
Flip_X_lowlevel();
Flip_X_lowlevel(Brush, Brush_width, Brush_height);
break;
case 3 : // Flip Y
Flip_Y_lowlevel();
Flip_Y_lowlevel(Brush, Brush_width, Brush_height);
break;
case 4 : // 90° Rotation
Rotate_90_deg();
break;
case 5 : // 180° Rotation
if (Brush_height&1)
{ // Brush de hauteur impaire
Flip_X_lowlevel();
Flip_Y_lowlevel();
}
else
Rotate_180_deg_lowlevel();
Rotate_180_deg_lowlevel(Brush, Brush_width, Brush_height);
Brush_offset_X=(Brush_width>>1);
Brush_offset_Y=(Brush_height>>1);
break;
@@ -3394,9 +3391,7 @@ void Button_Brush_FX(void)
Start_operation_stack(OPERATION_STRETCH_BRUSH);
break;
case 8 : // Distort
Display_cursor();
Message_not_implemented(); // !!! TEMPORAIRE !!!
Hide_cursor();
Start_operation_stack(OPERATION_DISTORT_BRUSH);
break;
case 9 : // Recolorize
Remap_brush();