Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!stanford.edu!leland.Stanford.EDU!portia!calder From: calder@uluru.stanford.edu (Paul Calder) Newsgroups: comp.windows.interviews Subject: Re: figures in doc Message-ID: Date: 10 May 91 18:57:48 GMT References: <9105091907.AA19327@lurch.Stanford.EDU> Sender: news@leland.Stanford.EDU (Mr News) Reply-To: calder@lurch.stanford.edu Organization: Stanford University Lines: 90 In-Reply-To: garry@alice.att.com's message of 9 May 91 17:51:45 GMT Garry Hodgson reports ... However, I cannot seem to get the figures within a [doc] document to print. (This patch is archived as 3.0-fixes/fix5 on interviews.stanford.edu) Printing is broken for tranformed glyphs. The problem lies with damage checking in Printer. Briefly, printer uses the Canvas damage check, which in turn uses the Canvas transformation matrix. But Printer does not propagate transformation changes through to Canvas. The upshot is that transformed glyphs use incorrect transformations for damage checks when printing. Apply with ``patch -p -N < fix5'' at the top of the source tree. ================ *** iv/src/lib/InterViews/printer.c.orig Mon Apr 15 10:52:49 1991 --- iv/src/lib/InterViews/printer.c Tue Apr 23 15:18:16 1991 *************** *** 193,198 **** --- 193,199 ---- } void Printer::push_transform() { + Canvas::push_transform(); PrinterRep* p = rep_; flush(); int depth = p->info_->count(); *************** *** 207,215 **** --- 208,218 ---- int depth = p->info_->count(); p->info_->remove(depth - 1); *p->out_ << "grestore\n"; + Canvas::pop_transform(); } void Printer::transform(Transformer& t) { + Canvas::transform(t); PrinterRep* p = rep_; flush(); float a00, a01, a10, a11, a20, a21; *************** *** 219,235 **** *p->out_ << " " << a20 << " " << a21 << "] concat\n"; } - /* - * The current transform push/pop just saves and restores state, - * so we can use it for clipping as well. - */ - void Printer::push_clipping() { ! push_transform(); } void Printer::pop_clipping() { ! pop_transform(); } void Printer::new_path() { --- 222,242 ---- *p->out_ << " " << a20 << " " << a21 << "] concat\n"; } void Printer::push_clipping() { ! PrinterRep* p = rep_; ! flush(); ! int depth = p->info_->count(); ! PrinterInfo info = p->info_->item(depth - 1); ! p->info_->insert(depth, info); ! *p->out_ << "gsave\n"; } void Printer::pop_clipping() { ! PrinterRep* p = rep_; ! flush(); ! int depth = p->info_->count(); ! p->info_->remove(depth - 1); ! *p->out_ << "grestore\n"; } void Printer::new_path() { -- Paul Calder Computer Systems Lab Stanford University calder@lurch.stanford.edu