Posts: 55
Threads: 17
Joined: May 2018
Reputation:
3
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
05-05-2020, 04:20 PM
(This post was last modified: 05-05-2020, 05:39 PM by Pocholo.)
Hello everyone, I hope you are fine and staying safe!
I'm still learning how to write script-fu script and before I ask the question, I will like to thank all the experienced coder that are been helping me through out this learning process.
Now, I will like to know the script-fu procedure to place a a Star on the center of the canvas using the "Star brush. Thank you in advanced!
Posts: 6,338
Threads: 272
Joined: Oct 2016
Reputation:
562
Operating system(s):
Gimp version: 2.10
Take Image width, image height, divide both by two, set the brush (or not, if you expect the used to set the appropriate brush) and then use gimp-paint-brush-default(layer,2,(x,y)).
If you really mean a round dot, you can also create a circle selection and bucket-fill it.
Posts: 6,338
Threads: 272
Joined: Oct 2016
Reputation:
562
Operating system(s):
Gimp version: 2.10
No, the first parameter is a layer. The color is implicit, it is taken from the "context" (the foreground color from the toolbox, if you didn't change it in your script)
Posts: 6,338
Threads: 272
Joined: Oct 2016
Reputation:
562
Operating system(s):
Gimp version: 2.10
You are mistaking me for a Scheme expert. I can't hep much, but your parentheses are unbalanced and (gimp-paintbrush-default layer 2 (350,350)) should probably be (gimp-paintbrush-default layer 2 (350 350)) (no comma).
Posts: 6,338
Threads: 272
Joined: Oct 2016
Reputation:
562
Operating system(s):
Gimp version: 2.10
Yes, but it works with one points (two coordinates) and you don't need to construct an explicit array.
I use StackOverflow daily (I'm even a solid contributor) and I recommend that you take what you see there with a grain of salt. There are solutions that work, and solutions that work for the right reasons. tThere are many answers that look like "that was a miracle for me, it could be a miracle for you".
You will start to learn only when you go beyond copy/paste and start tinkering.