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
 ObjLayer question

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
spetric Posted - Nov 23 2015 : 13:09:33
I'm trying to put anchor an object to layer using
ObjAnchorToLayers = true and ObjLayer[hobj] = layer_index.

However, object is not drawn relative to layer's position.
Do I need to adjust object's Left and Top values using layer's PosX and PosY or I'm missing something?

Also, when layer is moved, object(s) anchored to layer is not moved.

TIA,
Siniša
2   L A T E S T    R E P L I E S    (Newest First)
spetric Posted - Nov 23 2015 : 14:09:29
Thanks Bill,

I've found ObjAnchorToLayers set to false in one of my class constructor, overriding default setting (true).

Thanks a lot,
Siniša
w2m Posted - Nov 23 2015 : 13:55:30
If the objects are correctly anchored to a layer then you should not have to do anything. The objects position is relative to the layer and the object can not be dragged off the layer. When the layer is moved, all objects in the layer are moved with the layer. I have a project that does this correctly which you are welcome to. If you want it email me.

procedure TForm1.FormCreate(Sender: TObject);
begin
  ImageEnVect1.IO.Params.BMP_HandleTransparency := True;
  ImageEnVect1.Gestures.Pan.Enabled := True;
  ImageEnVect1.Gestures.Zoom.Enabled := True;
  ImageEnVect1.DisplayGrid := Grid1.Checked;
  ImageEnVect1.DisplayGridLyr := 0;
  ImageEnVect1.LayersSync := True;
  ImageEnVect1.Proc.AutoUndo := False;
  ImageEnVect1.Proc.UndoLimit := 99;
  ImageEnVect1.ForceALTkey := True;
  ImageEnVect1.ObjAnchorToLayers := True;
  ImageEnVect1.ObjBitmapHandleTransparencyOnSel := True;
  ImageEnVect1.ObjBoxInnerSelectable := True;
  ImageEnVect1.MaxSelectionDistance := 15;
end;

procedure TForm1.ImageEnVect1NewObject(Sender: TObject; hobj: Integer);
begin
  ImageEnVect1.ObjLayer[hobj] := ImageEnVect1.LayersCurrent;
  ImageEnVect1.MouseInteract := [];
  ImageEnVect1.MouseInteractVt := [miObjectSelect];
end;


I hope this helps.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development