[interfacekit] Re: White Hat Hacking
- From: "Graham Gilmore" <grahamg@xxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Fri, 08 Feb 2002 00:41:36 -0500
>
>Hello,
>Here's a screen grab of the latest state of the "hack" I had
>mentionned a few months ago, meant as an encouragement to continue,
>and especially, make some more stable work than this, because as
>you can see there are tons of off-by-one's and clipping bugs:
>
>http://cdegea.free.fr/.pub/freebe_007.png
>
>So to make this mail somewhat useful(?) and on-topic, my
>piece of advice is be careful with BRect.Width() et al :-)
>and take off-by-ones into account since the very start
>because afterwards it's a pain to go through everything
>and fix it. But when you get something displayed on
>screen that even remotely ressembles a BeOS desktop woah --
>it's heaps of rewarding fun. The sooner this stage is
>reached the sooner the fun I guess.
>
(My apologies if this was already plainly obvious to you :)
IIRC the BeOS pixel coordinate system is somewhat different from other
OSes.... They have the coordinates at the corners between the pixels,
rathern than in the center of the pixels (or was it the other way
around? I never did get around to doing much applications
development... *sigh*) so if you're thinking in the wrong way, you'll
keep making off-by-one errors all the time :-) For example: A line
from 1,1 to 10,1 is 9 pixels long rather than 10, and a BRect that has
coordinates 1,1,2,2 will contain ONE pixel, not 4.
Someone slap me with a trout if I'm wrong :)
Graham
- Follow-Ups:
- [interfacekit] Re: White Hat Hacking
- From: Cedric Degea
- References:
- [interfacekit] White Hat Hacking
- From: Cedric Degea
Other related posts:
- » [interfacekit] White Hat Hacking
- » [interfacekit] Re: White Hat Hacking
- » [interfacekit] Re: White Hat Hacking
- » [interfacekit] Re: White Hat Hacking
- » [interfacekit] Re: White Hat Hacking
- » [interfacekit] Re: White Hat Hacking
- [interfacekit] Re: White Hat Hacking
- From: Cedric Degea
- [interfacekit] White Hat Hacking
- From: Cedric Degea