First svn commit of the experiment with layers. Preemptive backup (to shorten delay before drawing) is currently disabled. Basic Undo/Redo works, but not image resizing, the adjust tool, and saving (not even flattened)

git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1039 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2009-09-21 14:16:41 +00:00
parent faea65e62b
commit cedb706326
15 changed files with 489 additions and 572 deletions

View File

@@ -728,8 +728,7 @@ void Capture_brush(short start_x,short start_y,short end_x,short end_y,short cle
for (y_pos=start_y;y_pos<start_y+Brush_height;y_pos++)
for (x_pos=start_x;x_pos<start_x+Brush_width;x_pos++)
{
Pixel_in_current_screen(x_pos,y_pos,Back_color);
Pixel_preview (x_pos,y_pos,Back_color);
Pixel_in_current_screen(x_pos,y_pos,Back_color,1);
}
Update_part_of_screen(start_x,start_y,Brush_width,Brush_height);
}
@@ -1154,10 +1153,10 @@ void Capture_brush_with_lasso(int vertices, short * points,short clear)
for (x_pos=start_x;x_pos<=end_x;x_pos++)
if (Read_pixel_from_brush(x_pos-start_x,y_pos-start_y)!=Back_color)
{
Pixel_in_brush(x_pos-start_x,y_pos-start_y,Read_pixel_from_current_screen(x_pos,y_pos));
Pixel_in_brush(x_pos-start_x,y_pos-start_y,Read_pixel_from_current_layer(x_pos,y_pos));
// On regarde s'il faut effacer quelque chose:
if (clear)
Pixel_in_current_screen(x_pos,y_pos,Back_color);
Pixel_in_current_screen(x_pos,y_pos,Back_color,0);
}
// On centre la prise sur la brosse