[layers] Resizing canvas now works

git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1042 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2009-09-26 17:51:08 +00:00
parent 78e59e6127
commit b18266e017
2 changed files with 55 additions and 21 deletions

17
graph.c
View File

@@ -582,6 +582,7 @@ void Resize_image(word chosen_width,word chosen_height)
{
word old_width=Main_image_width;
word old_height=Main_image_height;
int i;
// +-+-+
// |C| | A+B+C = Ancienne image
@@ -597,10 +598,18 @@ 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);
//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(
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();
}
else
{