Fix graphical issue with gwinButtonDraw_ArrowRight and gwinButtonDraw_ArrowLeft routine

Declined
#17 · Created  · Last updated

Declined pull request

Nasty. That opened a can of worms :) It appears the real issue is not in the button code - the button code is correct. Try using different arrow sizes and dividers and you will see that sometimes leaving off the -1 helps and sometimes it makes it worse. The problem as far as I can tell is an algorithmic problem. DrawPoly uses our standard line drawing routine which uses Bresenham's algorithm. FillPoly uses a fixed point slope algorithm to parse edges. Unfortunately in some situations there is up to a pixel difference in the result. There are two possible real solutions: 1/ Change one of the two algorithms (in this case the line drawing routine - fixed point slope is more efficient on modern processors although it involves an integer divide), or 2/ Adjust the pixel error handling of one or both routines to get a closer result. I will look at both solutions and work out which is best to fix this properly.

Closed by: ·2015-02-14

Description

0 attachments

0 comments

Loading commits...