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
 Objects and Layers help
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AndyColmes

USA
351 Posts

Posted - Sep 15 2013 :  00:36:03  Show Profile  Reply
I have 2 layers in a TImageEnVect, Layer 0 and 1. Layer 1 is resizeable and moveable. I created an rectangle object by setting the MouseInteractVT to [miputbox]. After creating the object, I am unable to select and resize the object. My code is as follows:

hobj := ImageEnView1.AddNewObject;
ImageEnView1.ObjKind[hobj] := iekBOX;
ImageEnView1.SetObjRect(hobj, nRECT );
ImageEnView1.ObjPenColor[hobj] := clLime;
ImageEnView1.ObjPenWidth[hobj] := 2;
ImageEnView1.ObjPenStyle[hobj] := psSolid;
ImageEnView1.ObjStyle[hobj] := [ievsSelectable, ievsMoveable, ievsSizeable, ievsVisible];

Then in the OnNewObject event of the TImageEnVect, I set the MouseInteractVT to [miObjectSelect].

Where did I go wrong?

Thanks for any help.

klausdoege

Germany
389 Posts

Posted - Sep 15 2013 :  01:00:00  Show Profile  Reply
Hello Andy,

I know only imageenvect.addnewobject.
Imageenview.addnewobject ???
Maybe, that is the problem.

Klaus
www.klausdoege.de
Go to Top of Page

w2m

USA
1990 Posts

Posted - Sep 15 2013 :  05:22:52  Show Profile  Reply
You have to setup TImageEnVect to use specific layers for objects:

TImageEnVect.ObjLayer

Declaration
property ObjLayer[hobj:integer]:integer;

Description
Specifies layer index where the object is located (drawed and referenced). Default is "0" and means draw on layer 0.

hobj is the ID of the object. You can also specify IEV_NEXT_INSERTED_OBJECT (-1) which refers to the next object to be inserted or IEV_PREVIOUS_INSERTED_OBJECT (-2) for the last object inserted.


TImageEnVect.ObjAnchorToLayers

Declaration
property ObjAnchorToLayers:boolean;

Description
When true (default), all objects are anchored to a layer (using ObjLayer property). Otherwise (the old behavior) objects are just painted over all layers.

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

AndyColmes

USA
351 Posts

Posted - Sep 15 2013 :  09:01:40  Show Profile  Reply
Hello William,

That did the trick. Thanks very much.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: