ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Objects and Layers help

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
AndyColmes Posted - Sep 15 2013 : 00:36:03
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.

3   L A T E S T    R E P L I E S    (Newest First)
AndyColmes Posted - Sep 15 2013 : 09:01:40
Hello William,

That did the trick. Thanks very much.
w2m Posted - Sep 15 2013 : 05:22:52
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
klausdoege Posted - Sep 15 2013 : 01:00:00
Hello Andy,

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

Klaus
www.klausdoege.de