Re: [pygame] mapping logical coordinate ????

2008-03-12 Thread Nick Moffitt
Sibtey Mehdi:
 How to map the logical coordinates in to window coordinates using
 pygame.

I did a mock-up of this at http://zork.net/~nick/tkhasi/

The tactical.py has the classes that do the transformations, and
testcamera.py does a quick demo.  

-- 
A: No. Nick Moffitt
Q: Should I put my reply above quoted text?   [EMAIL PROTECTED]


Re: [pygame] mapping logical coordinate ????

2008-03-12 Thread Nick Moffitt
Nick Moffitt:
 The tactical.py has the classes that do the transformations

My bad.  http://zork.net/~nick/tkhasi/space.py is the file that actually
does the coordinate transformations (but remember that positive Y is
down on the screen)

-- 
Ill-informed qmail-bashing is better than no   Nick Moffitt
qmail-bashing at all. [EMAIL PROTECTED]
--Don Marti


RE: [pygame] mapping logical coordinate ????

2008-03-12 Thread Sibtey Mehdi
 

 Thanks,for your kind help

But, I am getting the coordinate (3000, 2000, 3400, 2400) from some others
tools and want to create the pygame.draw.rect (3000, 2000, 3400, 2400) to
show some information. I have create a Surface pygame.Surface ((4000, 3000))
and then tried to scale down it but the rectangle has not displayed in the
pygame window. Can anyone help me out? 

 

I have tried something like this

  screen = pygame.display.set_mode ((800,700))

  worksurf = pygame.Surface((4000,3000))

  pygame.draw.rect (worksurf, (255, 0, 0), (3000, 2000, 3400, 2400), 1)

  screen.blit (worksurf, (0, 0)))

  newSurf = pygame.transform.scale (worksurf, (800,700)) #scale down

  screen.blit (newSurf, (0, 0)))

 

 

Nick Moffitt:

 The tactical.py has the classes that do the transformations

 

My bad.  http://zork.net/~nick/tkhasi/space.py is the file that actually

does the coordinate transformations (but remember that positive Y is

down on the screen)

 

-- 

Ill-informed qmail-bashing is better than no   Nick Moffitt

qmail-bashing at all. [EMAIL PROTECTED]

--Don Marti



Re: [pygame] mapping logical coordinate ????

2008-03-12 Thread Ian Mallett
pygame.display.flip()?