From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 21 Dec 1995 13:53:56 -0500 From: Rob Pike rob@plan9.att.com Subject: Do bitblt function codes work? Topicbox-Message-UUID: 38e39c8a-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19951221185356.7x7Hc9mDem0J_KACyNL50sLoiLO8RAfAQ22I7-S0JqM@z> > From: nsof.co.IL!amos (Amos Shapir) > On a PC with vga and "out of the box" drivers, the following program > generates only 4 distinct images, not 16. It seems somewhere along > the line to/from the bitblt server, the lower two bits of the function > codes get hardwired to (binary)10. This is correct behavior. Since you're drawing the line with code segment(d, Pt(mid.x, r.min.y), Pt(mid.x, r.max.y), ~0, t); using drawing function 0<=t<=15, you might expect 16 different results. But since the source function is the constant ~0, not a general value, symmetries fold up and the number of results is reduced. The possible answers are 0->0, 0->1, 1->0, and 1->1. It is not the full matrix of possibilities because the source is a single value (1). For related information, see the comment in /sys/src/libgnot/gsegment.c. -rob