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
 ImageEnVector draw Vectorgram by userdate.
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

diaorp

China
2 Posts

Posted - Nov 20 2011 :  23:55:14  Show Profile  Reply
I want to draw a line in ImageEnVector not using mouse interative but useing my own date. For example, I give the start point(x1,y1) and the end point (x2,y2), then draw a line. How can i achieve it.Thank u.

fab

1310 Posts

Posted - Nov 21 2011 :  01:11:10  Show Profile  Reply
You have to set object properties then call AddNewObject. For example:

ImageEnVect1.AddNewObject(iekLINE, Rect(0,0,200,80), clBlack);
Go to Top of Page

diaorp

China
2 Posts

Posted - Nov 21 2011 :  06:42:28  Show Profile  Reply
Thanks for helping me solve the problem above. There is another question , how to draw a vector line on a layer ? As i want to move the layer by using the mouse.
Go to Top of Page

fab

1310 Posts

Posted - Nov 21 2011 :  10:48:47  Show Profile  Reply
Property ObjLayer[] specifies the object layer (where it is displayed and the base of its coordinates).
Assuming you have a layer 1 (the layer just over the background layer), you can create a line over it writing:

ImageEnVect1.ObjLayer[-1] := 1;
ImageEnVect1.AddNewObject(iekLINE, Rect(0,0,200,80), clBlack);


Index -1 means "index of next object that is created.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: