Skip to content

[Feature request] - Better Snap Points and Geometric analysis possible? #498

Open

Description

@0lm

Is this feature request related to a problem?

Half half I would say. The feature would make alot of work very convenient

Describe the best way to implement this.

Currently, Photo Demon's snap point system feels non-existend. Most of time, when I move objects, or want to add different images to a pre-created canvas size, I need to zoom in alot, to be even able to pull an image to the very corner of the canvas, without accidently pulling it too far away, so part of the image is out of the canvas

Is it possible to add a (better?) snap point system, where especially when you reach the canvas borders, it will hard snap immediately, needing you to pull again to overcome that hard snap? (similar to photoshop). And talking about snap points, is it possible to also add these geometric lines, which show you where the mid of the image is, or how far you are away from a certain object etc, while moving an object? So, I can, for example, snap added text boxes, or added images, in the mid of the canvas, or for example, two images, both same distance away from left and right canvas borders? Or two added images/text boxes on the same height level, or when resizing text boxes, to see, when it has the same size, by seeing these lines etc.

Im not sure how to describe it, but I hope you know how photoshop's snap system works. Then you will understand, I think. Im not sure if this is too much ask,, though. Not sure how hard/easy it is to implement a better/customizeable snap system.

EDIT: Just looked up some terms. I am referring to things like "snap to pixel", "snap to grid", or stuff like snapping to other objects on the canvas. But not sure how these distance measurment lines are called, though, when you move an object.

Thank you!

If this feature makes it into PhotoDemon, I am happy to add your name to PhotoDemon's contributor list. Please let me know what name (and optional website link) you'd like me to use.

Activity

  1. tannerhelland commented on Oct 20, 2023

    @tannerhelland
    Owner

    Great suggestion, @0lm. Thank you. I have added this to my short-term to-do list.

  2. 0lm commented on Apr 4, 2024

    @0lm
    Author

    Gimp could give hints and ideas on how to approach this feature (in case there is hopefully still interest to add this feature) - because with upcoming Gimp 3.0 in the near future (already implemented in the pre-release preview versions, I think), they added a better snap point system with geometrical relations to other objects. And since Gimp is opensource, this could be a good starter point. Personally, I unfortunately have no idea how to code this. But I assume it is maybe a bit harder than it sounds like, based on how long Gimp needed to introduce this feature.

    EDIT: Here a link to the feature description in Gimp:
    https://www.gimp.org/news/2024/02/21/gimp-2-99-18-released/#new-snapping-options

  3. tannerhelland commented on Apr 8, 2024

    @tannerhelland
    Owner

    Thank you for the follow-up, @0lm ! I'm sorry progress on this issue has been slow.

    I am working on snapping in a separate branch and snapping is now available when moving layers. I haven't solved snapping for selections yet, and snapping for layer resizing also remains to be solved. But progress is (slowly) being made.

    I hope it won't be too much longer before snap features are merged to the main branch. Thank you for continuing to track this issue.

  4. added a commit that references this issue on Apr 19, 2024
  5. added
    fixed
    and removed on Apr 19, 2024
  6. tannerhelland commented on Apr 19, 2024

    @tannerhelland
    Owner

    Snapping support is now available in nightly builds. Thank you for your patience!

    I will leave this issue open for a few days while I continue testing the feature. I also have a few more small snap-related enhancements I would like to add.

    Thank you again for suggesting this feature. I hope it helps!

  7. 0lm commented on Apr 21, 2024

    @0lm
    Author

    Snapping support is now available in nightly builds. Thank you for your patience!

    I will leave this issue open for a few days while I continue testing the feature. I also have a few more small snap-related enhancements I would like to add.

    Thank you again for suggesting this feature. I hope it helps!

    Just tested it, this is awesome. It makes so many things easier! And I read in #554 that you are also going to add a visualization feature (I assume it is those lines which show where the snap relates to when moving an object around?). Thank you for your efforts!

  8. tannerhelland commented on Apr 25, 2024

    @tannerhelland
    Owner

    Yes, exactly right! As I type this, I am committing a "smart guides" feature and uploading a new nightly build. (This is also in the View menu, and when enabled it will draw a highlight along the edge(s) being snapped. It is enabled by default.)

    I'm really happy with how this feature turned out, and hopefully future feature suggestions won't take me quite so long to implement 😅 Thank you for testing the snapping!

  9. 0lm commented on Apr 26, 2024

    @0lm
    Author

    The new Snap Smart Guide is working very well, too! Just a question out of curiosity: Is it possible to expand the Snap Feature and the Smart Guide Feature, so, multiple distances between multiple objects can be shown and snapped? Like.. if I want 10 different objects to have exact the same distance from each other. Or 4 objects, one at top, bottom, left and right, all 4 having same distance from the main image edges. Basically, relative distances to each other, when it is about multiple objects - to place objects kind of symmetrically. Thank you for your efforts and no need to be sorry, you are doing this voluntarily and for free, your Life definitely has priority.

  10. tannerhelland commented on Apr 30, 2024

    @tannerhelland
    Owner

    Thank you for the kind words, @0lm . They are appreciated.

    I am still trying to wrap my head around the "equidistant" snap feature in GIMP and Photoshop. I haven't fully figured out how to add a similar feature in PhotoDemon.

    Similarly, it's hard to know how to show distance to a specific object. How would the user select which object they want to show distance to? I could have a dropdown where the user selects a "distance from" target, but that only works for a single object at a time... IDK, there are some trade-offs I'm still trying to figure out.

    What I'd like to work on next is a feature to simply display distances to the edges of the main canvas when you're moving layers, like this:

    image

    I think this would be a helpful first step until I figure out how other software makes their "equidistant" snapping behavior work.

  11. 0lm commented on May 1, 2024

    @0lm
    Author

    You suggestion is actually a really good alternative! Being able to see distance numbers definitely will be helpful, in case "equidistant" feature is too complicated to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions