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
 miPutLine
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

John

USA
94 Posts

Posted - Jun 14 2011 :  07:05:10  Show Profile  Reply
Fabrizio

First off, congratulations on your new position. I am hopeful that this will allow continued development of ImageEn.

My question is premised on the following two points.

a) If I draw a miPutBox on a ImageEnVect1 component, I can query the object and obtain the left point (objleft) the top (objtop), the width (objwidth) and height (objheight). With these four values I can use the DrawBox function and draw an idential box on a separate ImageEnVect component.

b) If I draw a miPutLine I can capture the four points of the line and know that they represent a box that contains the line and that the line represents the hypotenuse of two right angle triangles contained by the box.

The question is, how to determine whether the left most point on the x axis is at the lower left or upper left corner of the box that surrounds the miPutLine. If the left most point is on the bottom then the actual line goes up. If the left most point is on the top then the line goes down. When I draw an X by creating two separate Putlines and then look at the above mentioned values for each of the two lines, the values are essentially the same, but the actual lines are obviously different.

I appreciate your efforts and anticipate your reply

John

fab

1310 Posts

Posted - Jun 14 2011 :  14:49:57  Show Profile  Reply
John,
you should get coordinates using GetObjRect method.
For example:

var rect:TRect;
...
ImageEnVect1.GetObjRect(hobj, rect);


Now in "rect" there are the two points (left,top -> right,bottom) as they were drawn.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: