9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Amos Shapir amos@nsof.co.il
Subject: Do bitblt function codes work?
Date: Sun, 31 Dec 1995 05:29:41 -0500	[thread overview]
Message-ID: <19951231102941.l39hs-9hUYGS3LrTWutrjMd2WM3Fc3orHDo1xxbKHP8@z> (raw)

In your message of Thu, 21 Dec 1995 08:53:56 GMT you wrote:

> > 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.

I have read this comment, and gather that this behavior is a feature;
but I still can't see the rationale behind it.  How can the "value"
parameter be anything but a constant?

I tried all values, and I still can't find any combination that ANDs
the pixel values of two bitmaps; e.g. in the given example, draw just
the part of the segment which falls within the disc.

Happy new year, anyway
	Amos Shapir		Net: amos@nsof.co.il
Paper: nSOF Parallel Software, Ltd.
       Givat-Hashlosha 48800, Israel
Tel: +972 3 9388551   Fax: +972 3 9388552        GEO: 34 55 15 E / 32 05 52 N






             reply	other threads:[~1995-12-31 10:29 UTC|newest]

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

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=19951231102941.l39hs-9hUYGS3LrTWutrjMd2WM3Fc3orHDo1xxbKHP8@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).