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
 [ImageEn] Layers versus objects
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Dmitri

Netherlands
4 Posts

Posted - Sep 12 2011 :  05:37:19  Show Profile  Reply
What are the differences between layers and objects? Objects are used in the TImageEnVect component. Is it possible to place an object on a layer?

w2m

USA
1990 Posts

Posted - Sep 13 2011 :  04:54:33  Show Profile  Reply

Fabrizio may want to define a layer different than I...

A layer is a "window containing an ImageENView or ImageENVect" that may be moved and resized on top of the parent ImageENView or ImageENVect.

Objects can only be created with the ImageENVect component.
TImageEnVect inherits from TImageEnView (has all methods and properties of TImageEnView), and handles vectorial objects and measurements.

ImageENView can not create objects. A vectoral "object" is placed in layer 0 of an ImageENVect component. Objects may be a box, a ellipse, a polygon or a bitmap or other object type... see the help file. Objects may be selected and moved or you can change the "objects" properties such as the circle or box border's thickness or color or in the case of a bitmap object the bitmap's image.

I have not used objects with layers very much. That said,
I modified the ImageENVect annotations demo to add and remove layers. In my testing it appears that all objects use layer 0 as their parent so the answer is yes you can add objects to an ImageENVect layer, BUT the objects parent is not the current (selected) layer. An objects parent is always layer 0.

What this means is... if you have a moveable and selectable layer the objects do not move when you move the layer because they are created in layer 0. If you remove a layer then the objects are not removed when the layer is removed.

There may be a way to create an object whose parent is a layer but I do not know how this can be done.
Regards,


William Miller
Go to Top of Page

fab

1310 Posts

Posted - Sep 15 2011 :  04:59:46  Show Profile  Reply
quote:
... other than a simple 1 line message...


Nigel is looking for a solution.
Go to Top of Page

fab

1310 Posts

Posted - Sep 15 2011 :  05:02:37  Show Profile  Reply
quote:
What are the differences between layers and objects? Objects are used in the TImageEnVect component. Is it possible to place an object on a layer?


Layers are bitmaps overlapped and are specific of TImageEnView.
Vectorial objects are specific of TImageEnVect (which in turns is inherited from TImageEnView), and add support for text, shapes and little bitmaps placed over all layers, but relative to the absolute (0,0) position.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: