Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!brutus.cs.uiuc.edu!apple!agate!ucbvax!ASC.SLB.COM!rxb From: rxb@ASC.SLB.COM (Rafael Bracho) Newsgroups: comp.windows.news Subject: Re: Canvas sizes Message-ID: <8911071702.AA03715.rxb@plutonium.ASC.SLB.COM> Date: 7 Nov 89 23:02:25 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 23 Regarding Russell Leighton's request: >In xnews, `readcanvas' scales the images to the unit square. >Given this how do I find out what the actual size of >the canvas is? I cannot use `getcanvasshape pathbbox' >because it will return 0 0 1 1. Do the following (assume can is the result of readcanvas): gsave can setcanvas 1 1 dtransform abs exch abs grestore The result will be the width and height of the canvas. Note that I used the undocumented (at least in the pre-FCS documentation) function 'abs' in both numbers although only the height will be negative. This is because I don't know if NeWS 3.0 will have its internal origin in the upper right hand corner, due to some X.12 requirements. {:-) Rafael Bracho rxb@asc.slb.com