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
 Scaling Multi Layered Image
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
727 Posts

Posted - Jan 14 2016 :  23:40:14  Show Profile  Reply
Hello,

I have run into a very typical problem.

In that software that we have developed the end user composes a complete design with multiple layers, masks, text layers, etc. at size 12 inches X 18 inches.

Now after completing composition the use wants to enlarge the whole composed to
14 inches X 20 inches (or 12 inches X 24 inches).

To accomplish this what I am doing is looping from 0th layer to max layer and enlarging each layer as per calculated enlargement percentage, but I am not able to calculate the exact horizontal and vertical location of each layer. Because of this layers seem to get misaligned after enlargement.

How can we achieve this?

Note: in all cased the largest layer (in terms of size) is the 0th Layer.

TIA

Yogi Yang


Yogi Yang

spetric

Croatia
308 Posts

Posted - Jan 15 2016 :  16:47:00  Show Profile  Reply
Hi,

I think you should shift layers centers by enlargement amount.

Some ad hoc solution would be to calculate and save layers center points
in some TPoint array before enlargement process. After enlargement process, get new layers center points and shift PosX and PosY by the difference between old and new center points...something like that.

HTH,
Siniša.

Go to Top of Page

xequte

39053 Posts

Posted - Jan 18 2016 :  22:47:26  Show Profile  Reply
Hi

The next update includes the methods:
  • TImageEnView.LayersRotateAll
  • TImageEnView.LayersRepositionAll
  • TImageEnView.LayersSizeAll


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: