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
 SoftShadow
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

bmesser

United Kingdom
234 Posts

Posted - Jun 06 2013 :  13:50:30  Show Profile  Reply
Hi

Does anyone know of a way to add a 'softshadow' effect to a number of layers in an ImageEnView component at the same time?

What also would be useful is to remove the softshadow effect from layers - at the moment all I end up doing is intensifying the shadow!

Bruce.

w2m

USA
1990 Posts

Posted - Jun 06 2013 :  15:31:51  Show Profile  Reply
procedure TForm1.AddShadows1Click(Sender: TObject);
{ Add Soft Shadow to all layers. }
var
  iLayer: integer;
begin
  for iLayer := ImageEnView1.LayersCount-1 downto 0 do
  begin
    ImageEnView1.LayersCurrent := iLayer;
    ImageEnView1.Proc.AddSoftShadow();
  end;
end;

procedure TForm1.DeleteShadows1Click(Sender: TObject);
{ Remove Soft Shadow from all layers. }
var
  iLayer: integer;
begin
  for iLayer := ImageEnView1.LayersCount-1 downto 0 do
  begin
    ImageEnView1.LayersCurrent := iLayer;
    ImageEnView1.RemoveAlphaChannel(False);
    { Make the layer transparent }
      ImageEnView1.Proc.SetTransparentColors(ImageEnView1.Layers[ilayer].Bitmap.Pixels[0,
        ImageEnView1.Layers[ilayer].Bitmap.Height - 1],
          ImageEnView1.Layers[ilayer].Bitmap.Pixels[0,
        ImageEnView1.Layers[ilayer].Bitmap.Height - 1], 0);
  end;
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

bmesser

United Kingdom
234 Posts

Posted - Jun 07 2013 :  01:50:51  Show Profile  Reply
Thanks Bill that works fine!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: