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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Changing the alpha of the complete layer

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
BionicWave Posted - Mar 31 2012 : 03:04:23
Say i have a pile of images as different layers.
In another component you can see the images that are piled up as
a list. Whenever i click on an image in the list i want to
- Make this image the toplayer of the TImageEnView.
- Change the alpha of the selected layer to non-transparent
- Change the alpha of all non-selected layers to a specific
transparency.

My questions are:
1) Can i move a layer to be a top-layer?
2) Can i change a layer to be transparent or not?


thanks for your help
2   L A T E S T    R E P L I E S    (Newest First)
BionicWave Posted - Apr 01 2012 : 07:46:40
Omg....
This easy?
Lol, i thought it would be more complicated to do so.
Many thanks for answering me.
w2m Posted - Mar 31 2012 : 05:32:00

Set the LayersCurrent to the selected index to make a layer the top layer. Change all layers transparency to specific transparency... say 100. Set the selected or top layer transparency to 255 or non-transparent. Using the demo in Samples\ImageProcessing1\
Layers try this:

procedure Tfmain.ImageEnMView1ImageSelect(Sender: TObject; idx: Integer);
var
i: integer;
begin
  // make all layers transparency 100
  for i := 0 to ImageEnView1.LayersCount - 1 do
    ImageEnView1.Layers[i].Transparency := 100;
  // make selected layer the top layer
  ImageEnView1.LayersCurrent := idx;
  // make current layer transparency 255
  with ImageEnView1 do
  begin
    CurrentLayer.Transparency := 255;
    RefreshControls;
  end;
end;


William Miller