Document expected behavior (internal & user-documentation).Īny opinion? Is it a big issue to drop this floating point API ? If we want to keep floating point coordinates, then we should document somewhere what it means to draw a aaline from (7.7, 3.1) to (7.2, 5.9). When we are on horizontal or vertical lines, or on exact diagonal, there should be no antialiasing.We should only consider integer points for start and end point. Same for codeproject which adds also the point of view that when we are on horizontal or vertical lines, or on exact diagonal, there should be no antialiasing (different to our current implementation).This (implementation) considers only integer startpoints.The reference seems to be Xiaolin_Wu's_line_algorithm, this wikipedia page doesn't mention floating points, but the gif uses the center of the pixel.save( draw_short_lines( True), 'aaline-int-n-half.bmp')Īs for me, I don't understand the meaning of floating point coordinates for this algorithm? I don't even know what I should put in unit tests. save( draw_short_lines( False), 'aaline-integer.bmp') aaline( surface, DRAW_COLOR, ( x_start, y_start),
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |