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
 Bakground Layer Color?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

933 Posts

Posted - Oct 18 2022 :  06:10:25  Show Profile  Reply
The demo \Demos\LayerEditing\Layers_AllTypes shows how to add end edit specific Layers.

Unfortunately, it is not possible to edit the COLOR of the BACKGROUND LAYER (the color of the background behind -not around- the image) - despite I have set ImageEnView.BackgroundStyle = iebsSolid at design-time.

I need a Background Layer that has a solid color and fills the whole ImageEnView area - especially the area behind the image, so when areas of the image are alpha-transparent then that color shines through. Is this possible?

xequte

38608 Posts

Posted - Oct 18 2022 :  18:16:43  Show Profile  Reply
Hi

ImageEnView.BackgroundStyle does not set the style of the layer 0 (i.e. the "Background" layer), it sets the styling behind layer 0. So the image of layer 0 will generally obscure it, so to see a solid background behind your layers, do one of the following:

1. Set layer 0 to minimum size:

ImageEnView1.Blank();

2. Make layer 0 full transparent:

ImageEnView1.Layers[0].Bitmap.AlphaChannel.AlphaFill( 0 );
ImageEnView1.Update();

3. Make layer 0 the size of the window and fill it:

ImageEnView1.Layers[0].Bitmap.Allocate( ImageEnView1.ClientWidth, ImageEnView1.ClientHeight, clRed );
ImageEnView1.Update();

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: