BlendLine-Func

BlitzPlus Forums/BlitzPlus Programming/BlendLine-Func

"While Int(X#) <> X2"

That's why.

Reccomend you check before you draw to see if the line is vertical or horizontal and then use an optimized function which does not do a readpixel for drawing in those directions since they will not need antialiasing.

I also reccomend that you determine for each pixel individually if said pixel is 100% opaque before doing the readpixel, so you can avoid it if the pixel will be solid. On near vertical and near horizontal lines there may be many pixels which end up being solid.

Thsi leads to azn intereting question though. Diagonal lines too would seem to always want to have all solid pixels. Every point on the true line passes through the center of a pixel.

I suppose the proper thing to do would be to try to draw a 1 pixel wide line inatead of an infinitely thin one, though that would lead to lines which aren't very sharp. But it would be the most accurate method.