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
 TImageEnVect: How to create/use my own template
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

atlandev.mq

3 Posts

Posted - Feb 06 2012 :  12:27:36  Show Profile  Reply
Is it possible to automatically draw with TimageEnVect a star, an arrow or else? The exemble provides inserts an image but I would like to create an object 100% vector.
Such as
buttonclick(sender: TObject);
begin
Self.ImageEnVect.AddNewObject(iekMyStar, Rect(10,10,20,20), clRed);
end;
best regards.

fab

1310 Posts

Posted - Feb 07 2012 :  00:46:33  Show Profile  Reply
It is only possible to draw a polygon. For example this draws a star:

  ImageEnVect1.SetObjPolylinePoints(-1, [Point(0,65), Point(50,80), Point(65,130), Point(80,80), Point(130,65), Point(80,50), Point(65,0), Point(50,50), Point(0,65)]);
  ImageEnVect1.ObjKind[-1] := iekPOLYLINE;
  ImageEnVect1.AddNewObject();
Go to Top of Page

atlandev.mq

3 Posts

Posted - Feb 07 2012 :  20:34:30  Show Profile  Reply
Thank for reply. It works fine.
Other day, Other problem...
How could keep the ratio in polyline ? I want to let users change the height or width but keeping the same ratio.
I've tried with "OnObjectMoveResize" but calculate in real time doesn't seem to be the solution.
Suggestion ?
Best regard and good work. Cheer.
Go to Top of Page

fab

1310 Posts

Posted - Feb 08 2012 :  00:44:32  Show Profile  Reply
quote:
How could keep the ratio in polyline ?


User can press and hold ALT key while resizing, or you can force it setting:

ImageEnVect1.ForceALTkey := true;

Go to Top of Page

atlandev.mq

3 Posts

Posted - Feb 08 2012 :  05:54:43  Show Profile  Reply
Cool, thanks a lot.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: