Re: tk scale

From: Francois Rouaix (
Date: Sun Feb 07 1999 - 03:47:54 MET

Message-Id: <>
From: Francois Rouaix <>
To: Pascal Rigaux <>
Subject: Re: tk scale
Date: Sat, 06 Feb 1999 18:47:54 -0800

> I'm looking for something to convert the Pixels units to Millimeters in a canvas.
> Seems like the tk function is "tk scale", but i can't find it in ocamltk41 :(
> I could do without it (seems like by default there is 3.66 factor between the
> 2), but i wonder if it could be done another way...

Yes, unfortunately, we may have missed some functions in ocamltk41, and
miss most of the functions added in Tcl/Tk 8.0.
There is always the solution of adding entries in the Widgets.src file of
the ocamltk distribution, or simply create new .src files and apply the
"tkcompiler" to generate the stubs.
In this case, I would expect that something like

module tkscale {
  function (float) get ["tk"; "scale"]
  function () set ["tk"; "scale"; float]

would be enough to lift the "tk scale" command. However, a brief look
at Welch's book does not confirm that this command can be used to do
what you describe (eg converting from Pixels to Millimeters).


This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:19 MET