X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdraw%2Fao_line.c;h=14e1a3c1a591aec6b2cdc5341e08f57d2e01fca2;hb=c3414603bb9993e4cf3f0163ae0575758201b041;hp=10c071eb4bdbc3cd77931231e937ff3dde39f0d4;hpb=0c1fd7fe05092a179f0ce3c0a2294f14e71300f9;p=fw%2Faltos diff --git a/src/draw/ao_line.c b/src/draw/ao_line.c index 10c071eb..14e1a3c1 100644 --- a/src/draw/ao_line.c +++ b/src/draw/ao_line.c @@ -12,8 +12,8 @@ * General Public License for more details. */ -#include "ao_draw.h" -#include "ao_draw_int.h" +#include +#include #define ao_mask(x,w) (ao_right(AO_ALLONES,(x) & AO_MASK) & \ ao_left(AO_ALLONES,(FB_UNIT - ((x)+(w))) & AO_MASK)) @@ -239,7 +239,7 @@ ao_clip_line(struct ao_cc *c, struct ao_cbox *b) } void -ao_line(const struct ao_bitmap *dst, +ao_line(struct ao_bitmap *dst, int16_t x1, int16_t y1, int16_t x2, @@ -325,10 +325,17 @@ ao_line(const struct ao_bitmap *dst, if (adx > ady) { x1 = clip_1.major; y1 = clip_1.minor; + x2 = clip_2.major; + y2 = clip_2.minor; } else { x1 = clip_1.minor; y1 = clip_1.major; + x2 = clip_2.minor; + y2 = clip_2.major; } + + ao_damage(dst, ao_min16(x1, x2), ao_max16(x1, x2), ao_min16(y1, y2), ao_max16(y1, y2)); + ao_bres(dst, signdx, signdy,