procedure TForm1.Button1Click(Sender: TObject);
var
ilayer: integer;
begin
// If LayersSync is true. all layers must have the same size.
// If false (the default), layers can have different sizes and can be moved by code or user interaction (see MouseInteract).
ImageENView1.LayersSync := False;
// Add a layer
ilayer := ImageENView1.LayersAdd;
// Set the layers position and dimensions and properties
ImageEnView1.CurrentLayer.Name := AnsiString('Footer Layer');
// Specifies the relative (to the layer 0 - background image) position of the layer. Valid only when LayersSync=False.
ImageEnView1.CurrentLayer.PosX := 0;
//Specifies the relative (to the layer 0 - background image) position of the layer. Valid only when LayersSync=False.
ImageEnView1.CurrentLayer.PosY := ImageENView1.Layers[0].Bitmap.Height-32;
// Specifies the layer height (in bitmap sizes). Valid only if LayersSync=False.
ImageEnView1.CurrentLayer.Height := 32;
// Specifies the layer width (in bitmap sizes). Valid only if LayersSync=False.
ImageEnView1.CurrentLayer.Width := ImageENView1.Layers[0].Bitmap.Width;
// A box around the layer will be displayed
ImageEnView1.CurrentLayer.VisibleBox := True;
// If true (default) the layer is selectable by user action
ImageEnView1.CurrentLayer.Selectable := True;
// If LayersDrawBox is true, a box is drawn around layers.
ImageEnView1.LayersDrawBox := True;
//ImageEnView1.CurrentLayer.Transparency := 0;
{I assume you would add a bitmap to the layer or draw text on the footer layer later so
this is just for demonstration only}
// Make the footer layer transparent
ImageEnView1.Proc.SetTransparentColors(TColor2TRGB(clBtnFace), TColor2TRGB(clBtnFace), 0); // remove the white, making it as transparent
ImageEnView1.Update;
// Allow selecting, moving and resizing the layers
ImageEnView1.MouseInteract := [miMoveLayers, miResizeLayers];
end;
William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html