I want to draw a box around a portion of my graphic for the purpose of highlighting it.
How can I do that?
I want to draw a box around a portion of my graphic for the purpose of highlighting it.
How can I do that?
Use the rectangle selection box, and under the Edit menu, hit Stroke Selection. Select your options from there, and hit "Stroke" to apply the stroke.
Select Filters > Render > Gfig...
From there you can draw boxes and other shapes boxes in various styles.
Use the box select tool, then Select >> Border This selects around your current selection's outline (dotted animated line), at a distance of however many pixels you enter in the dialog box on either side of original line. i.e. if you use 5 for Border's input value, you will have a 10 px wide border selected. Then fill it in with paint bucket. You now have a box. Or... fill a layer with any colour, pattern, gradient, image etc., and use the selection to create a black box in a white layer mask using the same selection. Select all on layer mask, and gaussian blur a bit. That will give you a blurred border, using whatever image is on the layer. Everything that is black on the layer mask will be transparent to the layer below. Using this image as the main layer, I created a thick blurred border, but started with a circle selection instead of a square. I also did a border select on the original border select (after filling in layer mask) to blur the edges of my new border, and not the whole border.
Original:
New Border
Example using black layer instead of image, and rounded corners.
After going through all these convoluted answers, I figured out a simpler one.
Create a new layer. Set the opacity to 50%. Set your foreground color to yellow (or whatever). Click the Rectangle Select tool. Draw a box around the text you want to highlight. Don't hit enter. Go immediately to the edit tab, and select Fill with foreground Color. Hit enter. Ta Da!
Create keyboard shortcuts for it
If you are using this a lot, create custom keyboard shortcuts for it as mentioned at: https://docs.gimp.org/2.10/en/gimp-concepts-shortcuts.html
Then, search for: "Stroke Selection".
Two possibilities open up, and I set:
These are inspired by the similar predefined fill shortcuts "Ctrl + ," and "Ctrl + .".
Now:
Also note that you can make multiple rectangular strokes at once by selecting multiple rectangular selections at once by holding Shift:
and then after "Ctrl + Alt + ," it immediately becomes:
Tested on Gimp 2.10.18.