Hi,

I wonder, if there is an easy way to count all pixel in a line.

For example a line from 0,0 to 800,600. How many pixel will these line have. I had to know that, BEFORE a line was painted in a window. And it mu?t be very fast, because I have to count many lines...

Can you help ?

Thanks, Nordwind64

I wonder, if there is an easy way to count all pixel in a line.

For example a line from 0,0 to 800,600. How many pixel will these line have. I had to know that, BEFORE a line was painted in a window. And it mu?t be very fast, because I have to count many lines...

Can you help ?

Thanks, Nordwind64

If you include both end-points then it'll be 801. ;) Solve a simplier related problem and extrapolate for general solution...

Hi,

ok, thank you. I've found the way, it's really easy... :grin:

Greetings, Nordwind64

ok, thank you. I've found the way, it's really easy... :grin:

Greetings, Nordwind64