Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selection and canvas bounds?
#7
(06-27-2021, 02:06 PM)PixLab Wrote: If I may suggest...
Short suggestion (a lazy one, has limitation)
Take the width/height of the canvas (image / canvas size) you multiply by 2 (or more) align center, do what you need to do and then divide the canvas width/height by 2 align center at the end...

Longer one, (but cleaner as no limitation)
Take the width/height of the canvas, search the farthest node outside the canvas, resize the canvas proportionally 2-3 pixels bigger than the farthest node, do what your plugin need to do, then resize canvas to original size at the end...

Yes, you are right, that would be the best thing to do. Now it is up to the user to extend the canvas temporarily, and I am not doing about it anything now. Too much work and experimenting for a quick job. But perhaps some  day. Thanks for the idea.

Edit: No, that is impossible after all. The user must make the selection before calling the plugin. And at that point the selection cannot go outside of the canvas and cannot be made large enough to contain some out-of-canvas anchors. Then if inside the plugin the canvas is enlargened, it is of no use - the plugin does not know which anchors the user wanted to select.

So it is Rich's workaround, and it is up to the user to do it.
Reply


Messages In This Thread
Selection and canvas bounds? - by Ottia Tuota - 06-27-2021, 09:47 AM
RE: Selection and canvas bounds? - by PixLab - 06-27-2021, 10:48 AM
RE: Selection and canvas bounds? - by rich2005 - 06-27-2021, 11:25 AM
RE: Selection and canvas bounds? - by Ofnuts - 06-27-2021, 12:06 PM
RE: Selection and canvas bounds? - by Ottia Tuota - 06-27-2021, 12:17 PM
RE: Selection and canvas bounds? - by PixLab - 06-27-2021, 02:06 PM
RE: Selection and canvas bounds? - by Ottia Tuota - 06-27-2021, 02:39 PM
RE: Selection and canvas bounds? - by denzjos - 06-27-2021, 03:46 PM
RE: Selection and canvas bounds? - by Ottia Tuota - 06-27-2021, 05:58 PM
RE: Selection and canvas bounds? - by PixLab - 06-28-2021, 05:00 AM
RE: Selection and canvas bounds? - by Ottia Tuota - 06-28-2021, 07:18 AM

Forum Jump: