Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Pixels off by one.  (Read 2118 times)

0 Members and 1 Guest are viewing this topic.

tanders12

  • Newbie
  • *
  • Posts: 9
    • View Profile
Pixels off by one.
« on: May 17, 2011, 03:11:34 am »
Ok I'm sure the answer to my question is somewhere in the forums but doing a search for the title didn't get me to far.

When you define a window or a rectangle to be a certain size, does that define the actual size or the number of pixels? For example, if I make a window of size 100x100, the upper-left pixel is (0,0), correct? So is the bottom-right pixel (99,99) or (100,100)? If it's (100,100) then the actual size would be 101x101.

The problem I'm having is that I'm referring to positions within the window using constants that are ratios of the full window size, and I suspect that they are off by just a little bit because I'm assuming the size is 100x100. I hope this makes sense...

PhiLLe

  • Newbie
  • *
  • Posts: 36
    • View Profile
Pixels off by one.
« Reply #1 on: May 17, 2011, 06:44:55 am »
In my understanding the size is 100x100 (0x0 to 99x99). At least that how it is everywhere else and I never had a 1 pixel border at two sides when I used background sprites.

 

anything