Re: [pygame] Native PyGame method for automatically scaling inputs to a surface resolution?

2011-10-02 Thread Greg Ewing
Mac Ryan wrote: Those inaccuracies would essentially be the fruit of scaling down a very large physical model to screen resolution, so I truly wouldn't care if I would expected my sprite to be 1px to the left or what it appears, as far as the model performs accurately. Possibly you wouldn't ca

Re: [pygame] Native PyGame method for automatically scaling inputs to a surface resolution?

2011-10-02 Thread Mac Ryan
On Sun, 02 Oct 2011 13:53:02 +1300 Greg Ewing wrote: > Now, suppose our arithmetic is a little inaccurate, and we > actually get x = 0.499. The boundaries then come out as -0.001 > and 0.999. If we round these, we get 0.0 and 1.0 as before. > But if we floor, we get -1.0 and -0.0, and the pixel g

[pygame] Segfault using surface.fill()

2011-10-02 Thread Chris Pezley
I did a little google-fu and found an old entry which describes my problem, but nobody answered: http://www.mail-archive.com/pygame-users@seul.org/msg09485.html What I'm trying to do is basically the following: #taken from the Mouse class self.posx, self.posy = mouse.get_pos() self.

Re: [pygame] Native PyGame method for automatically scaling inputs to a surface resolution?

2011-10-02 Thread Mac Ryan
On Sun, 02 Oct 2011 14:12:21 +1300 Greg Ewing wrote: > > If you're going to say that lines are 1-dimensional and thus > > infinitely smaller than pixels, and thus we're obliged to draw a > > thin rectangle whenever we want a line, then (a) I probably would > > not use the tool if it doesn't even

Re: [pygame] Native PyGame method for automatically scaling inputs to a surface resolution?

2011-10-02 Thread Greg Ewing
Christopher Night wrote: Not that it's the most important thing in the world, but I think that OpenGL agrees with me. Here's a program that creates a scaled surface extending from (0,0) to (1000, 1000), with a canvas size of 100x100 pixels (so the scale factor is 0.1). It then draws the follow

[pygame] Functions in config files

2011-10-02 Thread sam . hacking
Hi, In my GUI toolkit, I have config files that the program can parse and turn into a complete menu screen. Now, if I have a button in my menu, and I want that button to run a function when it is clicked, then I need some way of naming a function from the config file. At the moment I am just pars