PDA

Click to See Complete Forum and Search --> : Standing on the edge...


pjvdg
Feb 25th, 2001, 07:52 AM
I am currently using DirectX 7 for game programming,
I just have one little question, how do I put, for example, a bitmap on coordinates -30,-30
(the bitmap itself is 80x80), so I can see a piece of the bitmap on my screen...

All positive values seem to work, why can't the negative ones work aswell?

thx in advance...

plenderj
Feb 28th, 2001, 11:04 AM
Well the co-ordinate system for systems starts with (0, 0) in the top left hand corner of the screen, not dead centre.

So if you wanted to take just a part of it, just blit only part of it to the destination hDc.

- jamie

HarryW
Feb 28th, 2001, 11:22 AM
Sounds like you're using DirectDraw, right?

You should be able to use the Blt() function to blit to those coordinates, so long as you have attached a clipper to the surface. Otherwise it will get messed up, because you can't blit a picture to just anywhere.