I am testing the new ImageEnLayerMView component. Nice work! Using this component rather than a ListView is almost entirely automatic which takes far less code that using a ListView. The components events are not described in the help file. Can you add that please?
I think there should be some flexibility to format the layers info text and hopefully you agree.
This is what I have been using for TListView: iListItem.Caption := IntToStr(iListItem.Index); iListItem.SubItems.Add(GetLayerKindStr(ImageEnView)); iListItem.SubItems.Add(GetShapeKindStr(ImageEnView)); iListItem.SubItems.Add(ImageEnView.Layers[i].Name); iListItem.SubItems.Add(IntegerToString(ImageEnView.Layers[i].PosX)); iListItem.SubItems.Add(IntegerToString(ImageEnView.Layers[i].PosY)); iListItem.SubItems.Add(IntegerToString(ImageEnView.Layers[i].Width)); iListItem.SubItems.Add(IntegerToString(ImageEnView.Layers[i].Height));
Add Layer Kind and Shape Kind text and alllow adjustment of PosX and PosY. Width, Height (0,0; 640,480) text to PosX: 0 PosY: 0 Width: 640, Height: 360 in an event.
I also noticed that the background image is not shown until a second layer is added. With only a background layer the component draws a blank thumbnail. Shouldn't the background be drawn from the background layer bitmap instead of being blank?
You can test it with https://www.imageen.com/ieforum/attach/w2m/2018922101655_BrushTools.zip. When you open an image the ImageEnLayerMView thumbnail is just a white image, until you add a second layer. After adding a second layer, the background thumbnail is shown correctly. This is also duplicated in your layers demo.
Some direct operations on the ImageEnView.IEBitmap (such as assigning it via ImageEnMView1.CopyToIEBitmap() do not trigger a bitmap change event, and so the LayerMView is not updated automatically.
These kind of programmatic operations require you to call ImageEnLayerMView1.ReadLayers();