Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!udel!haven.umd.edu!uflorida!kluge!serss0!acmfiu From: acmfiu@serss0.fiu.edu (ACMFIU) Newsgroups: comp.sys.apple2 Subject: Re: windows, modems and /bin/share... Message-ID: <3601@kluge.fiu.edu> Date: 21 May 91 05:23:49 GMT References: Sender: news@kluge.fiu.edu Organization: Florida International University, Miami Lines: 46 In article RXBROWN@UALR.BITNET ("MR.FANTASTIC") writes: ]]Well don't get me wrong... there's a bit more to grafports than my ]]simple explination, but I thought that kind of got the basic idea ]]across. Yes, you can have "offscreen" grafports. You can do all your ]]drawing to the offscreen grafport and nothing will happen on the screen. ]]Then, later when you want it to appear on the screen, you can do a ]]quick PPToPort to copy your offscreen port to a visible one. This is ]]like a caching mechanism. ]] ]]-- ]]===> Josef W. Wankerl, Technical Editor for GS+ Magazine ]] BITNET: JWANKERL@UTCVM.BITNET | America Online: JWankerl ]] ProLine: jwankerl@pro-gsplus |-------------------------------- ]]Internet: jwankerl@pro-gsplus.cts.com | "I am a Viking" -Y. Malmsteen ] ] I went back and read up on Grafports in the Programmers Intro. Then I read ]the section on printing. In the printing section they use a Grafport to dump ]the image of what is to be printed to the printer. I think this is where the ]initial confusion came from. What else are Grafports used for? ] ]Robert ]****************************************************************************** ]Real: Robert Brown * Profanity is the one language all ]Academic Computing Services Lab Manager * programmers know best. ]Bitnet: RXBROWN@UALR * I speak for me, myself, and I!! ]AOL: ROBPHD * Tires and tax not included,void where ]Apple //GS the power to be your best. * prohibited. Member FDIC.............. ]****************************************************************************** i think the reason you first need to print the image to a grafport is because you can't send commands like DrawText directly to the print manager. you have to manually construct what the page will look like in memory. once you construct this bit image, then you send this image off to the printer. grafports aren't "used" specially for anything particularly. all drawing by QD is done to a grafport. a grafport is just some area defined in memory where QD will draw stuff, i.e. LineTo, DrawChar, FillRect, etc. i think if you understand the relationship between QD and GrafPorts then you'll be all set. now, the Window Manager uses grafports. however, notice that you need QD started in order for Window Manager to work. the idea of a grafport stifled me at first. however, write a few programs (preferably in asm so you can step through with GSBug) and see what happens as you do QD calls to the grafport. albert