From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <82c890d00706220037n6f64ee85pb30f8aedf9ed759e@mail.gmail.com> Date: Fri, 22 Jun 2007 09:37:03 +0200 From: "Gabriel Diaz" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] printing via local attached printer with gs driver In-Reply-To: <20070618180031.7874F1E8C4D@holo.morphisms.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <82c890d00706181054s3ba18e59tdc4127bc232e7358@mail.gmail.com> <20070618180031.7874F1E8C4D@holo.morphisms.net> Topicbox-Message-UUID: 84c04d60-ead2-11e9-9d60-3106f5b1d025 hello I recompiled taking this in account, but the problem persists (the src/gshtscr.c has a sightly different line in the distribution than in the mkfile, so i changed it to the one of mkfile ) Also sources already have the make_other_poles function patched. thanks gabi On 6/18/07, Russ Cox wrote: > 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 > >