Re: Tk 9: image -format svg -scaletowidth not working?

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Tk 9: image -format svg -scaletowidth not working?
De : wortkarg3 (at) *nospam* yahoo.com (Harald Oehlmann)
Groupes : comp.lang.tcl
Date : 08. Jul 2024, 13:27:54
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v6gm04$s6vf$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
Am 08.07.2024 um 14:16 schrieb Ralf Fassel:
* 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'
Mark,
sorry for the odd format. It is always bad, if internals expose on user level. This is an internal issue. There is only the "-format" string which is communicated to the image format driver. Instead of adding something like "driver options", this format string was extended to a list.
I would love to change this one day...
Thank you for your understanding,
Harald

Date Sujet#  Auteur
8 Jul 24 * Tk 9: image -format svg -scaletowidth not working?9Mark Summerfield
8 Jul 24 `* Re: Tk 9: image -format svg -scaletowidth not working?8Ralf Fassel
8 Jul 24  +- Re: Tk 9: image -format svg -scaletowidth not working?1Harald Oehlmann
9 Jul 24  `* Re: Tk 9: image -format svg -scaletowidth not working?6Mark Summerfield
9 Jul 24   +- Re: Tk 9: image -format svg -scaletowidth not working?1Harald Oehlmann
9 Jul 24   `* Re: Tk 9: image -format svg -scaletowidth not working?4nemethi
9 Jul 24    `* Re: Tk 9: image -format svg -scaletowidth not working?3Mark Summerfield
9 Jul 24     `* Re: Tk 9: image -format svg -scaletowidth not working?2nemethi
10 Jul 24      `- Re: Tk 9: image -format svg -scaletowidth not working?1Mark Summerfield

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal