Sujet : Re: Tk 9: image -format svg -scaletowidth not working?
De : ralfixx (at) *nospam* gmx.de (Ralf Fassel)
Groupes : comp.lang.tclDate : 08. Jul 2024, 13:16:45
Autres entêtes
Message-ID : <ygamsmst6xe.fsf@akutech.de>
References : 1
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
* Mark Summerfield <
mark@qtrac.eu>
| It fails with this error:
>
| Error in startup script: unknown option "-scaletowidth"
| while executing
| "image create photo -file $svg {*}$opt"
| (procedure "icon" line 3)
| invoked from within
| "icon test.svg 24"
| invoked from within
| "ttk::button .button -command {destroy .} -image [icon test.svg 24]"
| (file "./svgtest2.tcl" line 8)
>
| Can someone tell me what I'm doing wrong?
>
| I'm using Tcl/Tk 9.0b2 on Debian Linux.
The manpage says:
Image formats may support sub-options, which are specified using
additional words in the value to the -format option.
This sounds to me as if you need to specify the additional options like
-scaletowidth *with* the -format option, like so:
-format [list svg -scaletowidth 24]
instead of
-format svg -scaletowidth 24
R'