2008/11/7 Bert Freudenberg bert@freudenbergs.de:
On 07.11.2008, at 01:35, Igor Stasenko wrote:
Now, second thing, if you look through code, how PasteUpMorph works with Display, it acquring an #assuredCanvas , which in own turn makes sure it gets new, fresh __offscreen__ form , having same dimensions as current Display to draw into it.
World assuredCanvas form == Display
Hi Bert,
hmm, if you look at
WorldState>>assuredCanvas remoteServer ifNotNil:[^self assuredRemoteCanvas]. (canvas isNil or: [(canvas extent ~= viewBox extent) or: [canvas form depth ~= Display depth]]) ifTrue: ["allocate a new offscreen canvas the size of the window" self canvas: (Display defaultCanvasClass extent: viewBox extent)]. ^ self canvas
the line:
Display defaultCanvasClass extent: viewBox extent
creates a new form if current canvas is nil. And its not a DisplayScreen class instance, its a Form. Now i can't find a code, which restoring canvas if it was reset, back to use canvas which having form == Display.
Aha... reading Andreas reply i found the place where canvas is set back to Display canvas.. Its in #doDeferredUpdatingFor:
- Bert -