Offset a stroke - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: Offset a stroke (/Thread-Offset-a-stroke) |
Offset a stroke - ohenry - 03-01-2023 I am a brand new user of GIMP and so am not familiar with the correct terminology. I searched on various permutations of this thread title but came up empty. I am not especially graphics oriented and will never be a frequent user. However, when you learn how to use a new tool, it turns out to come handy in the future for many tasks you never foresaw. I was steered toward GIMP by a friend who used to have Photoshop and I mentioned that I had a project in mind about making a photo collage. Because his Photoshop had died with his computer's hard drive, he suggested I look into GIMP. Well, the photo deal is on hold but I have been using the program to help create silkscreen stencils for cookie decorating. I have found several You Tube videos which really help explain how to accomplish my simple tasks much easier and quicker than the simplistic, inefficient ways I had started out using. My current dilemma concerns a logo shape which I want to make thinner. The procedure will be to screen the logo shape, in this case the script of a college name, with one color of icing. Then a reduced shape is screened over in a different color, which will hopefully yield a uniform border around the second screening. I started with a PNG file of the logo. Using GIMP I split the file into separate files for each color. The inner color outline is too close in size to the border color. To get an outline of the inner color I followed an on-line suggestion: LAYER > TRANSPARENCY > ALPHA TO SELECTION SELECT > TO PATH SELECT > NONE [hide layer, make new layer] EDIT > STROKE PATH in the STROKE LINE menu This left, presumably, a STROKE LINE around the edges of the inner color. I have a background in AutoCAD. In any CAD program, OFFSETing a line refers to drawing a parallel line on whichever side of the object line you choose. If the object closed, say a square or an unfilled alphabetical letter, you end up with larger or smaller squares or letters but the centers of both the originals and offsets remain the same. With this background I had intended to OFFSET the STROKE LINE inside the current outline by several pixels. Then I intended to flood that with the inner color, thereby creating a slightly enlarged border around the now smaller inner color. But it appears that OFFSET has an entirely different meaning in GIMP. So some specific questions: I see the STROKE LINE I created, but don't know how to select it and verify what entity type GIMP thinks it is, i.e., is it actually a STROKE LINE? Can a STROKE LINE be offset smaller as I described above, i.e., not scaled? If not, what type of GIMP entity or procedure is able to accomplish this? Thanks for any guidance, Rick RE: Offset a stroke - sallyanne - 03-01-2023 After you stroke your first line dont 'scale' the selection but 'shrink' it by however many pixels you wish and do this however many times you need.
Stroking after shrinking then turning each selection into a path.
Stroking paths will be smoother.
Once you have turned selections into paths the paths will stay there in that session or if you save as a xcf. Then to select a path you just need to go to the path dialog and choose it like you would a layer.
[attachment=9470]
You may also want to check this thread out https://www.gimp-forum.net/Thread-Disparities-between-stroke-selection-and-stroke-path RE: Offset a stroke - Ofnuts - 03-01-2023 It is actually easier to create the shape at full size, and then stroke an outline over it. For example like this: [attachment=9471]
[attachment=9472]
In practice,
If you want to stick with your technique, you can instead use Select > Shrink to shrink the shape by N pixels. This is almost an offset, but this tends to round off corners. To keep sharp corners, you can get a path from a the selection, stroke it as above (using miter joins in the line style), and get a selection from the stroked line. RE: Offset a stroke - rich2005 - 03-01-2023 Quote:..big snip...Then a reduced shape is screened over in a different color, which will hopefully yield a uniform border around the second screening. If it is just an outline then several ways for this. As Ofnuts described or the GEGL Drop Shadow filter with suitable settings. However as your CAD experience: For offsets to a path, (as ever) an old script, ra_offset_path.scm Unzip the attached. Put it in your scripts folder C:\Users\"yourname"\AppData\Roaming\GIMP\2.10\scripts. Then it is a right click in the path dock, bottom of the long context menu. If you repeat it check that the dialogue has not popped-under the Gimp window. Looks like this: [attachment=9473] might come in useful sometime. RE: Offset a stroke - denzjos - 03-01-2023 rich, thanks for this offset script (works with gimp 2.10.34) RE: Offset a stroke - rich2005 - 03-01-2023 @denzjos Not so good for complicated paths but might come in useful @ohenry Quote:...I have been using the program to help create silkscreen stencils for cookie decorating. .... My current dilemma concerns a logo shape which I want to make thinner. The procedure will be to screen the logo shape, in this case the script of a college name, with one color of icing. Then a reduced shape is screened over in a different color, which will hopefully yield a uniform border around the second screening. Possibly over-thinking this if it is for a sceen-print. Working in black / white for each colour screen ? You can color select the shape then stroke the selection (with same colour as the background) to reduce the size. example: https://i.imgur.com/IoUEZrw.mp4 RE: Offset a stroke - Krikor - 03-01-2023 (03-01-2023, 08:37 AM)rich2005 Wrote: For offsets to a path, (as ever) an old script, ra_offset_path.scm It seems that some results run away from expected... Below, an offset of -13 is applied to both circles. [attachment=9477] But I believe I can find a lot of use in this script. rich2005, thanks. RE: Offset a stroke - ohenry - 03-03-2023 Wow! Thanks to everyone. I will give each suggestion a try. I'll report my results. Best regards to all, Rick RE: Offset a stroke - ohenry - 03-03-2023 Update: I appreciate all of the replies posted. I began at the top of the list. I followed Sallyanne's suggestions as best I could and achieved the result I was aiming for. In the coming days I will work my way through the other methods in order to better learn the program. Rick |