Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* tk scale
@ 1999-02-02 18:51 Pascal Rigaux
  1999-02-03 16:07 ` Francois Pessaux
  1999-02-07  2:47 ` Francois Rouaix
  0 siblings, 2 replies; 4+ messages in thread
From: Pascal Rigaux @ 1999-02-02 18:51 UTC (permalink / raw)
  To: caml-list

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.




^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <199902031605.RAA05257@mouton.inria.fr>]

end of thread, other threads:[~1999-02-08  8:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-02 18:51 tk scale Pascal Rigaux
1999-02-03 16:07 ` Francois Pessaux
1999-02-07  2:47 ` Francois Rouaix
     [not found] <199902031605.RAA05257@mouton.inria.fr>
1999-02-03 16:14 ` Pascal Rigaux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox