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
 ImageEnVect.SetViewXYSmooth for rotated objects

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 - Feb 16 2016 : 05:07:15
I use the following code to automatically locate the object into view. This works perfect if the object is not rotated. Once I have performed a RotateAllObjects,the code does not seem to show the object correctly. How do I modify the code to handle rotated objects?

l := ImageEnVect1.ObjLeft[0];
t := ImageEnVect1.ObjTop[0];

xx:=trunc( l * (ImageEnVect1.Zoom/100) );
yy:=trunc( t * (ImageEnVect1.Zoom/100) );
ImageEnVect1.SetViewXYSmooth( xx-5, yy-5 );

Thanks in advance.

Andy

3   L A T E S T    R E P L I E S    (Newest First)
AndyColmes Posted - Apr 01 2016 : 11:31:45
Hi Nigel,

Thanks for the code and sorry for the late reply.. I will give it a spin and report back..

Thanks again.

Andy
xequte Posted - Feb 22 2016 : 16:29:27
Hi Andy

TImageEnVect allows for ObjLeft > ObjRight and ObjTop > ObjBottom to handle line drawing (know which way the line is pointing (TR->BL or TL->BR).

So please change your code as follows:

ImageEnVect1.GetObjRect( 0, aRect );
l := imin( aRect.Left, aRect.Right ) ;
t := imin( aRect.Top, aRect.Bottom ) ;

xx:=trunc( l * ( ImageEnVect1.Zoom / 100 ));
yy:=trunc( t * ( ImageEnVect1.Zoom / 100 ));
ImageEnVect1.SetViewXYSmooth( xx - 5, yy - 5 );




Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
xequte Posted - Feb 18 2016 : 16:56:49
Hi Andy

There is a limitation here due to the way returns object positions. We are investigating a solution.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com