Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Drawing line in Script-Fu
#6
Guys I thank for all your answers!


Quote:
I dearly hate script-fu.... this said when I look for example on the internet, most allocate arrays and plug values in it:
Code:
(let *
    (
        (points (cons-array 4 'double))
        (ax 100)
        (ay 100)
        (bx 300)
        (by 300)
    )
    (aset points 0 ax)
    (aset points 1 ay)
    (aset points 2 bx)
    (aset points 3 by)
    (gimp-paintbrush-default layerId 4 points)
)

I found that changing "
Code:
'#(0 0 area-width area-height)


To:


Code:
(vector 0 0 area-width area-height)

Helps. I don't know why.


Quote:You understand why I use Python...


I don't think that this is a Scheme problem. This is problem with incomplete documentation of API, and this is problem shared with Python-Fu. In fact, I toy with though of writing myself short tutorial because I figured already some stuff that is not documented.

And I have experience with many languages, including Python and Scheme, and I selected Scheme because Python-Fu has even less documentation than Script-Fu.

Quote:I would suggest that expecting anything to work on any particular instance of 2.99 is not a good idea.

Refreshing scripts is broken, and probably won't be fixed: https://gitlab.gnome.org/GNOME/gimp/-/issues/7445

Gimp 2.1x use GTK 2.0 that is no longer maintained. It has problems with handling never tablet drivers.
Reply


Messages In This Thread
Drawing line in Script-Fu - by Strzegol - 09-13-2023, 12:25 AM
RE: Drawing line in Script-Fu - by Ofnuts - 09-13-2023, 07:26 AM
RE: Drawing line in Script-Fu - by Strzegol - 09-14-2023, 01:32 AM
RE: Drawing line in Script-Fu - by Ofnuts - 09-14-2023, 07:37 AM
RE: Drawing line in Script-Fu - by Kevin - 09-14-2023, 09:10 AM
RE: Drawing line in Script-Fu - by Strzegol - 09-14-2023, 11:01 PM

Forum Jump: