AlSchemist wrote:
Hello Nidhogg
Attachment:
The attachment NoLongerDeprecated.jpg is no longer available
The historical comment in Japanese about
strbreakup highlighted in yellow"Making it
easier to split strings, so
improve them" has been kept as an encouragement.
Introducing iccii-aquabou v2.10.28 22 KB Aqua style pill buttonsAttachment:
The attachment iccii-aquabou2_10_28.zip is no longer available
Firstly, AlSchemist added you in the credits.
Nidhogg wrote:
File > Create >AquaPro2
Caution: there are
not any new features. It is a version for
who does
not hate Scheme.
This version includes
shortcuts, separated menu registration, some optimizations about constants "(* 512 2)" => "1024",
new pretty-print with aligned parenthesis and longer lines of Scheme beyond 80 char per line in full screen Notepad++.
AlSchemist removed
deprecated API and (- 867 333) =>
534 lines of Scheme.
This main subject of this article is:
1. How to find deprecated API in Gimp Script-Fu?Gimp menu "Filters" > "Script-Fu" > "Console":
Copy and paste the following function in the input area of the console then validate by ENTER:
(define (deprecated? strFnc)
(let* ( (pdb (gimp-procedural-db-query ".*" ".*Deprecated.*"
".*Deprecated.*" ".*" ".*" ".*" ".*")
)
(nbrDeprec (car pdb))
(lstPdbDeprec (cadr pdb))
)
(and (member strFnc lstPdbDeprec) #t)
) )
;-> Script-Fu replies by the name of the function deprecated? meaning that the Scheme code is OK.
Ask Script-Fu:
After the name of the function, enter as parameter
directly the name of any function such as
gimp-version between double quote as a string:
(deprecated? "gimp-version")
;-> #f
gimp-version is
not deprecated.
On the other hand:
(deprecated? "gimp-image-add-layer")
;-> #t
If you try unknown name of function, deprecated? will fail to preserve the future:
;-> #f
However parsing a function from iccii-aquabou.scm is out of the scope of this post.
Send a Private Message to AlSchemist if you are interested in the code in Scheme of
deprecated-list.
In short, hereafter enclosed is the result for the first big function of the Aqua style button:
(deprecated-list script-fu-aqua-button2)
;-> ("gimp-blend" "gimp-drawable-set-visible" "gimp-ellipse-select" "gimp-gradients-get-gradient" "gimp-gradients-set-gradient" "gimp-image-add-layer" "gimp-palette-get-background" "gimp-palette-get-foreground" "gimp-palette-set-background" "gimp-palette-set-foreground" "gimp-patterns-get-pattern" "gimp-patterns-set-pattern" "gimp-perspective" "gimp-rect-select" "gimp-selection-layer-alpha")
We can classify the deprecated API in three families from
easy to
difficult:
- Change of API name only: the list of parameters is unchanged
- Change of order of the parameters. Some extra parameters could be removed.
- Add new parameters
Stay tuned to sweeten the pill!
AlSchemist seems to have a great knowledge about tiny script
PixLab (a.k.a. Patrice) is no programmer
at All, but if you can tell to AlSchemist what Patrice did found about the original script that make Patrice feel "limited" in many ways with the original script (Patrice did not try the one from AlSchemist yet, he will wait)
Limitation about size of the font with "File/Create/AquaPro2/Button..."> Patrice cannot make font bigger than 685 pixels as at 686 he got an error, with the default font(which I don't have), and with another font, Patrice can go up to 697 pixels, but at 698 he got the same type of error.
Same error appear with "File/Create/AquaPro2/Logo in Pill..." Thus this tells him that there is limitation somewhere...
Same limitation/Error about the "File/Create/AquaPro2/Hrule..." about the "width" and "Height"
Same Error/Limitation about the "File/Create/AquaPro2/Round..." about the radius
All error got this message (only the floating point number change):
Error: Procedure execution of plug-in-gauss-rle2 failed on invalid input arguments: Procedure 'plug-in-gauss-rle2' has been called with value '860.504202' for argument 'horizontal' (#4, type gdouble). This value is out of range.
Attachment:
screenshot_20211117-121912.png [ 23.4 KiB | Viewed 1509 times ]
Also, Patrice found extremely annoying to
not have a slider on the UI to increase quickly the font size and other options, so he did discovered by comparing some tinyscripts that by changing only 1 parameter and 1 parameter only
SF-ADJUSTMENT _"Font Size (pixels)" '(75 2 2048 1 1 0 1)
//by
SF-ADJUSTMENT _"Font Size (pixels)" '(75 2 2048 1 1 0 0)
//Note the 1 to 0 on the last parameter
He now got a slider
and an input box with arrows up and down at the same time (no need to tell how Patrice is now happy), but in the end why tinyscripter don't do that?
Anyway thanks AlSchemist for me for having a look at this script
In the very end I'm exhausted to speak about me at the third person, and about you at the third of the third person, my next post will be back to "normal mode"