Author |
Topic |
|
spetric
Croatia
308 Posts |
Posted - Mar 05 2015 : 08:41:48
|
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 |
|
spetric
Croatia
308 Posts |
Posted - Mar 06 2015 : 02:26:34
|
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. |
|
|
xequte
38607 Posts |
Posted - Mar 06 2015 : 23:36:52
|
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
|
|
|
wesleybobato
Brazil
367 Posts |
Posted - Mar 07 2015 : 14:34:15
|
Hi spetric Congratulations, Very Nice.
Could you please Share with Me?
wesleybobato@gmail.com
have a great day. |
|
|
spetric
Croatia
308 Posts |
Posted - Mar 07 2015 : 16:21:54
|
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. |
|
|
xequte
38607 Posts |
Posted - Mar 08 2015 : 20:27:36
|
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
|
|
|
spetric
Croatia
308 Posts |
Posted - Mar 09 2015 : 03:14:51
|
Thanks Nigel,
this will do the trick.
|
|
|
|
Topic |
|