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
 Moving only top-left of iekLine
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

spetric

Croatia
308 Posts

Posted - Mar 05 2015 :  08:41:48  Show Profile  Reply
Hi,

Changing programmatically top and left of iekLine object

PaintView->ObjLeft[hLine]  =   x;
PaintView->ObjTop[hLine]   =   y;

moves complete line across the screen. Is it possible, somehow, to fix line ending coordinates in order to avoid constantly adjusting object's width and height (which involves storing initial end points: left+width and top+height)?

TIA,
Siniša

xequte

38607 Posts

Posted - Mar 05 2015 :  22:01:09  Show Profile  Reply
Hi Siniša

We'll look into that for a later update.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

spetric

Croatia
308 Posts

Posted - Mar 06 2015 :  02:26:34  Show Profile  Reply
Thanks Nigel,
it would be very helpful.

I made a workaround, but it's not a nice piece of code...quite cumbersome.



I had an old code for mesh grid, that uses iekPolyline, but
this code isn't elegant neither, so I switched to iekLine.

Maybe someone has more elegant solution for this task: moving grid control nodes (vertices) and adjust respective lines (edges)...it would be nice, as with iekLine I must remember initial edges ending positions.
Go to Top of Page

xequte

38607 Posts

Posted - Mar 06 2015 :  23:36:52  Show Profile  Reply
Hi

Wow, that looks so cool. I would love to try out the demo.

I'll investigate better ways of setting iekLine endpoints next week.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Mar 07 2015 :  14:34:15  Show Profile  Reply
Hi spetric
Congratulations, Very Nice.

Could you please Share with Me?

wesleybobato@gmail.com

have a great day.
Go to Top of Page

spetric

Croatia
308 Posts

Posted - Mar 07 2015 :  16:21:54  Show Profile  Reply
Hi,

No problem...well, it is a little problem, as I must extract code from big program (I must eliminate pointers to MGL and IPL libraris) and there will be only one warping method (Wolberg-Smythe), as other methods use old Intel IPL library. I have somewhere complete stand alone morph editor I wrote years ago, that can produce morphing sequence of two images.

I'll try to find it and port it to XE5. I need some time to investigate my archive.
Go to Top of Page

xequte

38607 Posts

Posted - Mar 08 2015 :  20:27:36  Show Profile  Reply
Hi Sinisa

You would be best to create some Helper methods to do it, SetTopOnly, SetBottomOnly, etc.

The code would be something like:

Procedure TImageEnVectHelper.SetTopOnly(hObj : Integer; iNewTop : Integer);
begin
  LockUpdate;
  iBottom := ObjTop[ hobj ] + ObjWidth[ hobj ];
  If iBottom < iNewTop then
    IESwap( iBottom, iNewTop );
  ObjWidth[ hobj ] := iNewTop - iBottom;
  ObjTop[ hobj ]   := iNewTop;
  UnlockUpdate;
end; 


We'll look at having a internal method for it in a later update.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

spetric

Croatia
308 Posts

Posted - Mar 09 2015 :  03:14:51  Show Profile  Reply
Thanks Nigel,

this will do the trick.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: