[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:
17
graph.c
17
graph.c
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user