Is it possible to create a one-pixel diagonal selection using gimp-free-select?
That is, for a 100 x 100 pixel image, the following pixels would be selected:
0,0
1,1
2,2
3,3
...
98,98
99,99
I've attached a simple test case in which I attempt to create such a selection over a white image and fill the selection in black, but it appears nothing is being selected, as the whole image turns out black. I expected a jagged diagonal line from the upper left corner to the lower right corner.
I'm guessing I'm misunderstanding something about the floatarray, as supposedly gimp-free-select can accept a minimum of 2 points.
The attached script-fu goes into a new Debug menu when registered.
| Attachment | Size |
|---|---|
| 1.99 KB | |
| 2.14 KB | |
| 2.14 KB | |
| 2.36 KB |
Just a guess
2 points vs. 3+ points
but there is an inside...
Selections are drawables
Just paint directly on the selection channel in white and those pixels will be selected.
Note that if you are just using numeric constants for the coordinates (not variables), you can reduce the last six lines to just:
I left out the grunt work.
EDIT: fixed up code formatting using 'pre' tags.