Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!jarthur!jseidman From: jseidman@jarthur.Claremont.EDU (James Seidman) Newsgroups: comp.lang.c Subject: Re: Turbo-C graphics pages!!! Message-ID: <4521@jarthur.Claremont.EDU> Date: 21 Feb 90 04:35:28 GMT References: <708@hwee.UUCP> Organization: Harvey Mudd College, Claremont, CA 91711 Lines: 47 In article <708@hwee.UUCP> smc@hwee.UUCP (Stephen McGowan) writes: > Anyone out there know about Turbo-C graphics pages? These pages are actually provided by your graphics card, not by Turbo-C. The compiler merely provides routines to access them. > I'm using the 0 page (default), but I need to switch to page > 1 to display further information from page 0. Whether or not a page 1 even exists, by the way, depends on your graphics card, how much memory it has, and what graphics mode you are in. > However, it appears as though I'm not able to address the cursor > co-ordinates (or more specifically, move the cursor using the > 'gotoxy(x,y)' statement. gotoxy() is a text function, yet you're talking about graphics stuff. What you describe later is doing more text. What exactly are you trying to do? > I can only use this facility if I use the 'textmode()' function > which, obviously, will reset my graphics displays on page 0. > > Funny thing is, I'm able to perform these 'gotoxy' calls if I remain > on page 0. However, this has the drawbaxck that it overwrites my > graphics displays. That is a funny thing. What does it do? Since it's supposed to position the text cursor, unless you're using the BGI text outputs it shouldn't have any effect on a graphics screen. > So, are the 2 graphics pages (0 and 1) exactly the same? Do they > inherit each other's attributes? Is page 0 capable of handling > both text and graphics simultaneously, whereas page 1 can only > support one mode? (as appears to be the case). They have identical attributes. They inherit each other's attributes inasmuch as most "attributes" (palette, graphics mode, etc.) are controlled by other registers on the graphics card. It only affects what memory locations are looked at for the graphics data. > Page 0 contains a 256*256 pixel image of a three-dimensional vision > scan. I would like to incorporate a facility where the user can move > the mouse pointer over a particular horizontal image line, press > a mouse button and have the 256 data values for that horizontal > line displayed on the screen... [stuff deleted] You never quite described why you need both graphics pages. By the way, when you change graphics pages, are you remembering to use both setactivepage() and setvisualpage()? Anyway, I would think that you could do what you're describing by using the BGI text output routines to display the stuff below the image. -- ------------------------------------------------------------------------------- Jim Seidman, Harvey Mudd College, Claremont, CA 91711. (714) 621-8000 x2026 DISCLAIMER: I don't even know if these are opinions, let alone those of anyone other than me.