[layers] Picture effects now work
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1043 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
b18266e017
commit
b534cfd7d4
4
graph.c
4
graph.c
@ -598,10 +598,6 @@ void Resize_image(word chosen_width,word chosen_height)
|
||||
Main_image_is_modified=1;
|
||||
|
||||
// On copie donc maintenant la partie C dans la nouvelle image.
|
||||
//Copy_part_of_image_to_another(
|
||||
// Screen_backup,0,0,Min(old_width,Main_image_width),
|
||||
// Min(old_height,Main_image_height),old_width,
|
||||
// Main_screen,0,0,Main_image_width);
|
||||
for (i=0; i<NB_LAYERS; i++)
|
||||
{
|
||||
Copy_part_of_image_to_another(
|
||||
|
||||
48
transform.c
48
transform.c
@ -377,28 +377,58 @@ void Button_Transform_menu(void)
|
||||
// Process the transformation:
|
||||
switch(clicked_button)
|
||||
{
|
||||
int i;
|
||||
|
||||
case 2 : // Flip X
|
||||
memcpy(Main_screen,Screen_backup,Main_image_width*Main_image_height);
|
||||
Flip_X_lowlevel(Main_screen, Main_image_width, Main_image_height);
|
||||
for (i=0; i<NB_LAYERS; i++)
|
||||
{
|
||||
memcpy(Main_backups->Pages->Image[i],Main_backups->Pages->Next->Image[i],Main_image_width*Main_image_height);
|
||||
Flip_X_lowlevel(Main_backups->Pages->Image[i], Main_image_width, Main_image_height);
|
||||
}
|
||||
break;
|
||||
case 3 : // Flip Y
|
||||
memcpy(Main_screen,Screen_backup,Main_image_width*Main_image_height);
|
||||
Flip_Y_lowlevel(Main_screen, Main_image_width, Main_image_height);
|
||||
for (i=0; i<NB_LAYERS; i++)
|
||||
{
|
||||
memcpy(Main_backups->Pages->Image[i],Main_backups->Pages->Next->Image[i],Main_image_width*Main_image_height);
|
||||
Flip_Y_lowlevel(Main_backups->Pages->Image[i], Main_image_width, Main_image_height);
|
||||
}
|
||||
break;
|
||||
case 4 : // -90° Rotation
|
||||
Rotate_270_deg_lowlevel(Screen_backup, Main_screen, old_width, old_height);
|
||||
for (i=0; i<NB_LAYERS; i++)
|
||||
{
|
||||
Rotate_270_deg_lowlevel(Main_backups->Pages->Next->Image[i], Main_backups->Pages->Image[i], old_width, old_height);
|
||||
}
|
||||
break;
|
||||
case 5 : // +90° Rotation
|
||||
Rotate_90_deg_lowlevel(Screen_backup, Main_screen, old_width, old_height);
|
||||
for (i=0; i<NB_LAYERS; i++)
|
||||
{
|
||||
Rotate_90_deg_lowlevel(Main_backups->Pages->Next->Image[i], Main_backups->Pages->Image[i], old_width, old_height);
|
||||
}
|
||||
break;
|
||||
case 6 : // 180° Rotation
|
||||
memcpy(Main_screen,Screen_backup,Main_image_width*Main_image_height);
|
||||
Rotate_180_deg_lowlevel(Main_screen, Main_image_width, Main_image_height);
|
||||
for (i=0; i<NB_LAYERS; i++)
|
||||
{
|
||||
memcpy(Main_backups->Pages->Image[i],Main_backups->Pages->Next->Image[i],Main_image_width*Main_image_height);
|
||||
Rotate_180_deg_lowlevel(Main_backups->Pages->Image[i], Main_image_width, Main_image_height);
|
||||
}
|
||||
break;
|
||||
case 7 : // Resize
|
||||
Rescale(Screen_backup, old_width, old_height, Main_screen, Main_image_width, Main_image_height, 0, 0);
|
||||
for (i=0; i<NB_LAYERS; i++)
|
||||
{
|
||||
Rescale(Main_backups->Pages->Next->Image[i], old_width, old_height, Main_backups->Pages->Image[i], Main_image_width, Main_image_height, 0, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
/*
|
||||
for (i=0; i<NB_LAYERS; i++)
|
||||
{
|
||||
Copy_part_of_image_to_another(
|
||||
Main_backups->Pages->Next->Image[i],0,0,Min(old_width,Main_image_width),
|
||||
Min(old_height,Main_image_height),old_width,
|
||||
Main_backups->Pages->Image[i],0,0,Main_image_width);
|
||||
}
|
||||
*/
|
||||
Redraw_layered_image();
|
||||
Display_all_screen();
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user