ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Snap To Grid feature for vector elements

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
MrDeveloper Posted - Sep 24 2021 : 05:05:39
Hello Together

I hope someone of you can help me. I need a "SnapToGrid" function for all ImageEn vector elements.
The questions would be:

1. How can I create a defined grid (configurable X and Y points)?
2. How can the vector objects that are created be snapped to this grid points?

Has anyone here done anything before with ImageEn? It would be very helpful if there was a demo application or at least a code snippet for this. Maybe Nigel can add something here in the very near future, as I can imagine it would be interesting for others as well.

Thanks for your help in advance!
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Sep 29 2021 : 21:35:30
Hi Kai,

Please email me for an updated beta that includes the functionality. We will consider snapping to align with other objects for a future version.

I've not had time to look at your application, I'm afraid.



Nigel
Xequte Software
www.imageen.com
MrDeveloper Posted - Sep 29 2021 : 03:01:22
Hello Nigel

Do you mean by "current" beta which you had already emailed me? If so, these extensions are unfortunately not yet included in my version (1021 Beta 928).

Another idea for the "SnapTo" function would be if it could snap to existing shape layers. For example, the current selection rectangle snaps to the outer box via "SnapDist" of a neighboring shape layer, so it would be possible to quickly align elements with each other. Ideally in width, height and position.

Is it already possible in the current version 10.2.0 to automatically jump to the Grips/Guideline elements defined in the Ruler?

If there is a new version, could you send it to me at the same email address as the last one? BTW I had also sent you yesterday by e-mail a customized "AddSpots" demo application with some test cases and questions.
xequte Posted - Sep 29 2021 : 01:32:06
Hi

You can do this in the current beta using:

// Draw a virtual grid of 20x20 pixels to make it easier to position and align layers
ImageEnView1.LayerOptions    := ImageEnView1.LayerOptions + [ loSnapToPos ];
ImageEnView1.DoubleBuffered  := True;    // Improve draw performance
ImageEnView1.DisplayGridKind := iedgSnapPoints;
ImageEnView1.LayersSnapDist  := 20;
ImageEnView1.Update();


Please email me to test this.

Nigel
Xequte Software
www.imageen.com
MrDeveloper Posted - Sep 25 2021 : 01:50:14
Hello Nigel

I think since the component TImageEnVect is legacy I better use the TImageEnView with the layer technique right? So we are talking about the TImageEnView in this case.

Thanks!
xequte Posted - Sep 25 2021 : 00:47:17
Hi

Is this for TImageEnView layers or TImageEnVect objects?

Nigel
Xequte Software
www.imageen.com