Ask all general Gimp related questions here
Post a reply

Need to generate an array of vertical lines (rulings) across a page.

Sun Mar 05, 2023 8:47 am

GIMP Version: 2.10.30
Operating System: Linux
GIMP Experience: Experienced User



Hi everyone.

Is there a way to draw a series of vertical rulings across a page? (Being able to draw horizontal ones too would be a happy bonus.)

I searched among my plug-ins and scripts, and did a search here for "array of lines" but I didn't recognize anything among the results. (I also looked inside G'Mic's "Arrays", reminding me of the FAMOUS quote from Don Knotts' immemorial film, The Ghost and Mr. Chicken: "They EVEN tried Bon Ami!")

Thank you. Meanwhile I go back to trying to make copies of a line every 3 mm manually...

Re: Need to generate an array of vertical lines (rulings) across a pag

Sun Mar 05, 2023 12:32 pm

One way to make vertical (or horizontal) lines is using the Grid filter: Filters -> Render -> Pattern -> Grid with settings as (1). Swap the settings round for horizontal.

However as I am sure you know, Gimp works in pixels not millimetres so to get a canvas to match set the resolution to something involving millimetres (2)

lines.jpg
lines.jpg (137.43 KiB) Viewed 767 times


That is for a one pixel line, heavier lines involve more tweaking and you might never get exactly 3mm spacing.

Re: Need to generate an array of vertical lines (rulings) across a pag

Sun Mar 05, 2023 4:08 pm

If the lines don't fall on integer pixels, one way is to create two paths that are the two extreme lines, use ofn-path-inbetweener to create the intermediate lines, and then "Edit > Stroke path" to render them.

Re: Need to generate an array of vertical lines (rulings) across a pag

Sun Mar 05, 2023 7:10 pm

Two excellent solutions, thank you, thank you. [1]

As I was out Sunday-driving today I pondered the potential usefulness of "copying 'the selection' to a set of defined points, perhaps even specifying x and y by functions.

That led to daydreams of me winning some kind of plugin-of-the-year award...

...and upon waking up to reality thinking again of G'Mic--and its multiplicity of functions--and potentially finding a script in the stack that could be used, perhaps elementally, to make such an array.

[1] Mis-report of not finding Grid filter. Mis-read your post.

Re: Need to generate an array of vertical lines (rulings) across a pag

Mon Mar 06, 2023 3:24 am

if you have GMIC an automatic way to do them is using 'scan lines'. It only does horizontal though so if your original picture permits you will have to give it a 90% turn

Re: Need to generate an array of vertical lines (rulings) across a pag

Mon Mar 06, 2023 7:19 am

Okay, I'll try to find that too! Thank you, sallyanne.
Post a reply