Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!exodus!dmaustin From: dmaustin@vivid.sun.com (Darren Austin) Newsgroups: comp.windows.open-look Subject: Re: canvas repaint, canvas resize Message-ID: Date: 13 Mar 91 04:41:00 GMT References: <64835@eerie.acsu.Buffalo.EDU> Sender: news@exodus.Eng.Sun.COM Organization: Sun Microsystems, Mountain View Lines: 25 In-reply-to: jung@autarch.acsu.buffalo.edu's message of 13 Mar 91 02:31:20 GMT In article <64835@eerie.acsu.Buffalo.EDU> jung@autarch.acsu.buffalo.edu (alexander w jung) writes: > Hi! Howdy! > I recently got into XView programming and tried the program line.c from the > O'Reilly book. The first thing that I had problems with was that the repaint > routine is only called when the window becomes larger after a resizing. > Therefore no redraw is done when parts of the canvas get hidden. This seems > efficiant when another window covers the canvas, but in this case its more or > less kind of a bug (or is there a way to enable this?). This is the ever present "canvas bit gravity" problem. You need to add CANVAS_FIXED_IMAGE, TRUE to the creation of the canvas. This will make the canvas package to set the bit gravity of the paint window(s) to ForgetGravity which will cause repaint events when the canvas is resized (either smaller or larger). Hope this helps, --Darren -- Darren Austin | Actually, it's a buck and a quarter Windows and Graphics Software | staff, but I'm not going to tell Sun Microsystems, Mountain View | *him* that. dmaustin@sun.com |