Hi guys!
In the last weeks I wrecked my brain to make a decent line drawing routine - not that there wouldn't be enough of and very optimized ones already in the thousands - but I wanted my OWN and without help - so to say reinventing my personal wheel
. Well I managed it somehow and I happily found a nice solution to simplify the Octant finding by drawing all lines in the same direction thus concentrating on only one halve of the Octants (depending on the coordinate system up or down).
Sorry I try to keep it short....
Here are my problem(s):
When I then went on to filling - I found out that setting "single-bit" for lines is not enough. I read about EOR drawing mode and shaping the edges and the nice trick omitting the 1st pixel by pointing BLTDPT to a scratch area.
Anyway my routine still sucks - have a look - this is what happens if I use the eor edge trick...
which leads to the following when filled:
WHAT the heck I am doing here? Why are the two edges and ONLY the two edges are shifted to the left!?! I cannot figure it out myself ...
Any suggestions? Shall I post my routine or is this a common and boring mistake? I don't get it ...
ADDON: BTW I just found out if I draw my polygon without the eor of the edges and fill it - it works???
and
I thought I would have understand the eor manipulation of the edges but obviously I totally suck
Any hints appreciated, thanks!