Andy,
I am not understanding what you want to do. Send me a small demo and I'll look at it.
Meanwhile you can try this:
procedure TForm1.CropAllLayers1Click(Sender: TObject);
var
i: integer;
begin
if ImageEnVect1.Selected then
begin
ImageEnVect1.SaveSelection;
// Crop each layer
for i := ImageEnVect1.LayersCount - 1 downto 0 do
begin
ImageEnVect1.LayersCurrent := i;
ImageEnVect1.RestoreSelection(false, iersSyncLayers);
ImageEnVect1.Proc.CropSel;
ImageEnVect1.CurrentLayer.PosX := 0;
ImageEnVect1.CurrentLayer.PosY := 0;
end;
ImageEnVect1.DiscardSavedSelection;
ImageEnVect1.MouseInteract := [miMoveLayers, miResizeLayers];
ImageEnVect1.Cursor := crHandPoint;
ImageEnVect1.DeSelect;
end
else
MessageBox(0, 'No Selection to Crop', 'Warning', MB_ICONWARNING or MB_OK);
end;
Now after cropping the image you resize Layer 1 with the mouse the image in layer 1 will be stretched to fit the bounds of the layer.
William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html