From: "Russ Cox" <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] printing via local attached printer with gs driver
Date: Mon, 18 Jun 2007 14:00:30 -0400 [thread overview]
Message-ID: <20070618180031.7874F1E8C4D@holo.morphisms.net> (raw)
In-Reply-To: <82c890d00706181054s3ba18e59tdc4127bc232e7358@mail.gmail.com>
Did you compile your own copy of ghostscript?
This is a common problem if you compile directly
from the gs sources; there are some Plan 9 specific
changes that must be made. See /sys/src/cmd/gs/mkfile:
# If you get weird floating point errors, the culprit is usually the
# halftone code, which converts double to uint, something 8c handles
# incorrectly (treats as double to int). Look in src/gshtscr.c for a line like
#
# sample = (ht_sample_t)((value+1) * max_ht_sample);
#
# and change it to one of:
#
# sample = (int)(vlong)((value+1) * max_ht_sample);
# sample = (ht_sample_t)(value * max_ht_sample) + max_ht_sample;
#
# depending on your preference.
#
# Also, recent versions of src/gxshade1.c cause the compiler to run out
# of registers. Brucee is looking into this. In the meantime, use this
# replacement:
#
# private inline void
# make_other_poles(patch_curve_t curve[4])
# {
# int i, j;
#
# for (i = 0; i < 4; i++) {
# j = (i + 1) % 4;
# curve[i].control[0].x = (curve[i].vertex.p.x * 2 + curve[j].vertex.p.x);
# curve[i].control[0].x /= 3;
# curve[i].control[0].y = (curve[i].vertex.p.y * 2 + curve[j].vertex.p.y);
# curve[i].control[0].y /= 3;
# curve[i].control[1].x = (curve[i].vertex.p.x + curve[j].vertex.p.x * 2);
# curve[i].control[1].y /= 3;
# curve[i].control[1].y = (curve[i].vertex.p.y + curve[j].vertex.p.y * 2);
# curve[i].control[1].y /= 3;
# curve[i].straight = true;
# }
# }
#
# (the original includes the /3 in the big expressions).
The source in the distribution should be patched already.
Also I thought I fixed 8c to do the right float -> uint
conversion, but it would have been quite a while ago
and I don't remember.
Russ
next prev parent reply other threads:[~2007-06-18 18:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-18 17:54 Gabriel Diaz
2007-06-18 18:00 ` Russ Cox [this message]
2007-06-18 18:07 ` Gabriel Diaz
2007-06-22 7:37 ` Gabriel Diaz
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=20070618180031.7874F1E8C4D@holo.morphisms.net \
--to=rsc@swtch.com \
--cc=9fans@cse.psu.edu \
/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).