ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Layer in Footer
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

tiago

Brazil
3 Posts

Posted - Sep 18 2012 :  13:22:02  Show Profile  Reply
hello
how can I do to put a layer on the bottom of a ImageENView ???

Tiago Melo

w2m

USA
1990 Posts

Posted - Sep 18 2012 :  14:04:16  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: