Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Divide selection using guides
#1
Hello,

First time here Smile

Anyway, I thought it would be useful if I could tell GIMP to use current selection as area for setting guides.

There is an option called New guide from selection (Images -> Guides -> New guide from selection), but this just
puts 2 horizontal and 2 vertical guides along sides of selection.


What I had in mind was to use current rectangular selection (or bounding box of it) and then "divide" it into equal parts by
setting guides  (number settable by user), either horizontally, vertically, or both.

So for example, let's say I have some kind of object on my canvas, and it's already placed on the right spot. 
And maybe I want to do some work on the middle third. 

I could use measure tool, but this won't work without calculator.


Another option would be using rectangular selection and then setting Rule of thirds under tool options.
But choosing any tool after that results in "guides" vanishing inside of the selection, so you have to put guides
manually right after making that selection, if you don't want to loose them.

Also, if you need any number of divisions that's not already predefined (center, thirds, fifths...) this technique will not really work. 
It can be done, but it will definitely take lots of repetitive steps.

So I wrote a small plugin that does exactly what I had in mind.

It's not finished yet, but it works. 

So how do you use it? After placing it in plugin directory, it registers itself under
Image -> Guides -> Divide selection using guides

First you make a selection. It doesn't have to be rectangular, and if it's not it will use the bounding box of the selection
for calculation. After making a selection, choose Divide selection using guides (under Image -> Guides).
Enter the number of divisions you need, and that's it.

Now, maybe I'm re-discovering here something that's common knowledge among gimpers,
but even if that's the case, this was a good learning experience. The only problem is I'm
getting lots of GEGL related errors (GIMP 2.10.32), but from what I could read here, it's not my plugin's fault. Smile


Attached Files
.zip   g_divide_selection_using_guides.zip (Size: 725 bytes / Downloads: 135)
Reply


Messages In This Thread
Divide selection using guides - by goran - 04-14-2023, 09:33 AM
RE: Divide selection using guides - by PixLab - 04-14-2023, 02:11 PM
RE: Divide selection using guides - by goran - 04-14-2023, 04:20 PM
RE: Divide selection using guides - by Ofnuts - 04-14-2023, 04:46 PM
RE: Divide selection using guides - by PixLab - 04-15-2023, 04:02 AM
RE: Divide selection using guides - by goran - 04-15-2023, 11:01 AM
RE: Divide selection using guides - by PixLab - 04-16-2023, 04:05 AM
RE: Divide selection using guides - by denzjos - 04-15-2023, 07:50 AM
RE: Divide selection using guides - by goran - 04-15-2023, 05:55 PM
RE: Divide selection using guides - by denzjos - 04-18-2023, 07:01 AM
RE: Divide selection using guides - by teapot - 04-15-2023, 11:14 PM
RE: Divide selection using guides - by goran - 04-16-2023, 06:16 AM
RE: Divide selection using guides - by Krikor - 04-18-2023, 06:09 PM
RE: Divide selection using guides - by goran - 04-18-2023, 06:53 PM
RE: Divide selection using guides - by Krikor - 04-18-2023, 07:02 PM
RE: Divide selection using guides - by goran - 04-19-2023, 06:26 AM
RE: Divide selection using guides - by PixLab - 04-19-2023, 01:41 PM
RE: Divide selection using guides - by denzjos - 04-19-2023, 08:39 AM
RE: Divide selection using guides - by goran - 04-19-2023, 11:36 AM
RE: Divide selection using guides - by Krikor - 04-19-2023, 06:18 PM

Forum Jump: