Question about RECTs
 
 
TANUT
(3/1/00 1:52:31 am)

Hi! Today I have some question about RECT!
If I have 50*50 picture in my surface
When I use BltFast...

picRECT.Top = 0
picRECT.Left = 0
picRECT.Bottom = **
picRECT.Right = **
Backbuffer.BltFast .......

At ** ,what I should it been 49 or 50 ?
Ya! No error .But What 49 or 50 ?



 
Martin
(3/1/00 3:04:58 am)

50, I think


 
black eyez  
(3/1/00 9:10:34 am)

Yeah, 50 will do it, not 49 

David



 
MetalWarrior  
(3/1/00 10:07:52 am)

Yeah, Right should be Left + Width, and Bottom should be Top + Height.

So if the picture is 50x50, that would be:

0 + 50 = 50
0 + 50 = 50

That's how you can tell what to use no matter what left and top values you have. 


 
Eric Coleman  
(3/1/00 4:07:31 pm)

DirectX is designed to not draw the right most and bottom most line of pixels. Its part of the rasterization proccess. from pixel 0 to pixel 49, you have a total width (or height) of 50 pixels. 
0 being the 1st,
1 being the 2nd, and so on with 
48 being the 49th
49 being the 50th pixel.

And you have to make room for the missing row of pixels, That's why you use 50 instead of 49.

Directx goes from 0 to 50, and doesn't draw the 51st pixel, which is numbered 50.

Eric



 
TANUT
(3/2/00 9:06:52 pm)

Thank You. -+,+-