returning coordinates of canvas objects in integer values



Greetings,

I noticed when I run my script on a screen resolution 1440x900 and get
coordinates of objects (ex.: .w coords tag1) I get floating numbers
ending with large number of decimals 549.99999999999999 whereas a
screen with resolution 1024x768 gives me numbers such as 550.0

This causes problems for me because I have to look for objects in
certain locations and 549.9999999999 throws things off. Is there a way
to neatly get object coordinates in integers or do I have to keep
converting them myself each time they are returned by the [coords]
command?

Thanks,
sd/
.



Relevant Pages

  • Re: returning coordinates of canvas objects in integer values
    ... I noticed when I run my script on a screen resolution 1440x900 and get ... .w coords tag1) I get floating numbers ...
    (comp.lang.tcl)
  • Re: conditional javascript script
    ... That code will not work as the include needs to be process at the server and JavaScript is client side. ... To accomplish create two script files that write out the code using document.write statements. ... > one based on a screen resolution of 800 X 600, ...
    (microsoft.public.frontpage.client)
  • Re: Screen Resolution Policy
    ... > Why - I have a user that does not like the screen resolution that a LCD ... > user logs in, they have to change the setting to a lower screen resolution ... But for her, it resets each night. ... Perhaps even with a script. ...
    (microsoft.public.win2000.group_policy)
  • Re: Remotely change screen resolution.
    ... "Matija Hrovat" wrote: ... computers support the mentioned resolution you can make a startup script ... which would change the screen resolution at startup. ...
    (microsoft.public.windowsxp.general)
  • Re: switching X resolution modes?
    ... >> to switch them with a script. ... xrandr changes the screen resolution, ...
    (Debian-User)