From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA32730 for caml-redistribution; Wed, 3 Feb 1999 16:44:20 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA09170 for ; Tue, 2 Feb 1999 19:50:53 +0100 (MET) Received: from dre2.polytechnique.fr (dre2.polytechnique.fr [129.104.42.26]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id TAA06622 for ; Tue, 2 Feb 1999 19:50:51 +0100 (MET) Received: by dre2.polytechnique.fr via sendmail from stdin id (Debian Smail3.2.0.102) for caml-list@inria.fr; Tue, 2 Feb 1999 19:51:39 +0100 (CET) To: caml-list@inria.fr Subject: tk scale From: Pascal Rigaux Date: 02 Feb 1999 19:51:39 +0100 Message-ID: <4w7lu0y6ys.fsf@dre2.polytechnique.fr> X-Mailer: Gnus v5.5/Emacs 20.3 Sender: weis 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... Precision: i can't use Pixels by default 'cuz it's int and not float and so isn't precise enough... That's why i use Millimeters. But when i ask something to tk, it answers in Pixels (eg: winfo reqwidth, ev_MouseX, winfo width) PS: the prog i'm writing is a function plotting tool (a la gnuplot), math oriented. The code is on ftp://dre2.polytechnique.fr/pub/graph-plotting.tgz cu Pixel. -------------------------------------------------------------------------------- En francais (dingue ce que je suis courageux :) Donc : Je cherche a convertir des Pixels en Millimeters (type units) dans un canvas. La fonction qui semble faire ca en tk, c'est "tk scale" mais je l'a trouve pas des ocamltk41 :( Je pourrais faire sans (un bete facteur 3.66, par defaut), mais je me demande si il y aurait pas mieux et plus propre... Precision: je peux pas utiliser les Pixels parce que c'est des int et c'est pas assez precis... Conclusion j'utilise des Millimeters. Mais quand je pose des questions a tk, il repond en int alias Pixels (ex: winfo reqwidth, ev_MouseX, winfo width) PS: le prog que j'ecris sert a tracer des courbes (a la gnuplot), mais oriente math. Par exemple il gere x=2, les inequations (hachures) et les tangentes. Le code se trouve sur ftp://dre2.polytechnique.fr/pub/graph-plotting.tgz a+ Pixel.