Switch to full style
Ask all general Gimp related questions here
Post a reply

Fill in a preset pattern using a Python-fu

Wed Dec 23, 2015 8:02 am

GIMP Version: 2.8.14
Operating System: Windows
GIMP Experience: New User



Hi all.

The select area or select path,
or to fill in a preset pattern using a Python-fu, do I do?

For example In the menu ,
Edit -> Stroke Path
Or ,
Edit -> Stroke Path
In it is possible.

My English is poor , but please forgive me .

Re: Fill in a preset pattern using a Python-fu

Wed Dec 23, 2015 12:39 pm

It is OK to ask your question in your native language.
Is this what you want to do?
11. Patterns or 3.18. Stroke Path or 3.11. Clone

Re: Fill in a preset pattern using a Python-fu

Wed Dec 23, 2015 7:18 pm

Code:
pdb.gimp_edit_stroke_vectors(drawable, vectors)

To use a pattern, bucket fill a complete layer, add a layer mask filled with black and stroke the path in white.

Re: Fill in a preset pattern using a Python-fu

Wed Dec 23, 2015 7:58 pm

Thanks!

To:Odinbc

Use 3.18.Stroke in Pattern.

Re: Fill in a preset pattern using a Python-fu

Wed Dec 23, 2015 8:24 pm

To:ofnuts

Thanks!
It is that you use a mask of fill!
I think that it was close to the very resolution!

When use the "3.18 Stroke Path", can change the thickness of line , is would be possible the same thing?

Re: Fill in a preset pattern using a Python-fu

Thu Dec 24, 2015 5:02 am

ruman wrote:To:ofnuts

Thanks!
It is that you use a mask of fill!
I think that it was close to the very resolution!

When use the "3.18 Stroke Path", can change the thickness of line , is would be possible the same thing?

The API doesn't expose the "line mode" stroking, it only strokes with a brush (which isn't as clean, and doesn't allow sharp angles...). So the line thickness is really the size of the brush that you are using. Your best bet is to create a "parametric" brush on the fly (pdb.gimp-brush-new() and the various pdb.gimp-brush-set...())(and delete it when the script ends).
Post a reply