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
 Magnify cutaway example?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

whisper1980

USA
23 Posts

Posted - Jun 10 2019 :  17:42:35  Show Profile  Reply
Anyone have a step-by-step example of how one can do a image magnify cutaway similar to what you see here for photoshop? It would be nice if there was a tool that could do most of the work, like place a circle on an image and click copy which would copy the circled part of the image as a new layer.

https://www.lifewire.com/create-magnified-cutaway-detail-in-photoshop-1702321

I have to confess... Maybe there is one already, but just started to look into it and thought I'd post this to see if anyone has already done this and has example source code they could share that might save me some time and experimentation.

Thanks,
Eric



Eric

xequte

4712 Posts

Posted - Jun 10 2019 :  23:52:29  Show Profile  Reply
Hi Eric

I'm afraid there is not an automated way to do this. You'd need to code something. I imagine when the user has a (circular) selection, they'd click a button and you would generate an image layer (zoomed image), two shape layers (black circles) and two line layers (connector lines).

The only bit that would be hard would be the math to position the connector lines. For this, you might want to use the OffsetPoint() method in hyieutils.pas



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

whisper1980

USA
23 Posts

Posted - Jun 12 2019 :  13:36:44  Show Profile  Reply
Thanks. I might just skip the lines. A blow-up of the circled area is all they were looking for. They can draw an arrow or something if desired.

Eric
Go to Top of Page

xequte

4712 Posts

Posted - Jun 13 2019 :  16:45:48  Show Profile  Reply
OK, let us know if you have any difficulty.

The connector lines won't be too bad.

Let's say you have a layer, lyr.

CenterPt is: Point( lyr.PosX + lyr.Width div 2, lyr.PosY + lyr.Height div 2);

So the start point for connectors on the layer would be:

StartPt1 := OffSetPoint( CenterPt, lyr.Width, lyr.Height, -45 );
StartPt2 := OffSetPoint( CenterPt, lyr.Width, lyr.Height, 135 );


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

whisper1980

USA
23 Posts

Posted - Jun 13 2019 :  18:13:17  Show Profile  Reply
Hey, thanks Nigel!

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