9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Rob Pike  rob@plan9.att.com
Subject: Do bitblt function codes work?
Date: Thu, 21 Dec 1995 13:53:56 -0500	[thread overview]
Message-ID: <19951221185356.7x7Hc9mDem0J_KACyNL50sLoiLO8RAfAQ22I7-S0JqM@z> (raw)

> 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






             reply	other threads:[~1995-12-21 18:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-12-21 18:53 Rob [this message]
1995-12-31 10:29 Amos
1995-12-31 14:58 dhog
1996-01-02 10:38 Amos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19951221185356.7x7Hc9mDem0J_KACyNL50sLoiLO8RAfAQ22I7-S0JqM@z \
    --to=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).