Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!ncar!boulder!sunybcs!bingvaxu!leah!itsgw!batcomputer!cornell!uw-beaver!ubc-cs!alberta!sask!lowey From: lowey@sask.UUCP (Kevin Lowey) Newsgroups: comp.lang.pascal Subject: Re: Turbo 4.0 graphics problem Message-ID: <1093@sask.UUCP> Date: 3 May 88 00:07:30 GMT References: <40184E8D@PSUVM> Organization: University of Saskatchewan Lines: 35 In article <40184E8D@PSUVM>, E8D@PSUVM.BITNET writes: > I seem to have run into a bug using the procedures OutText and OutTextXY > in Turbo 4.0 graphics mode. They reset the CP to the upper left corner of > the character box. OutText should only move CP if the horizontal > justification > is Left and OutTextXY shouldn't ever change the Current Position. > Does anyone know of a fix for this (aside from storing and retrieving CP)? I don't know if this is a bug, but there are two solutions (sort of). One is to write your own TEXTOUT routines, which save the CP, perform OutText, then restores the CP. The second works if you don't need to use the fancy text fonts. I've found that if you give the command DIRECTVIDEO := FALSE; then you can use the WRITE and WRITELN commands to display text (using the normal 8*8 box). I haven't tested it, but I don't think the CP is changed when you do this. The reason this works is TP 4.0 uses direct screen writes when DIRECTVIDEO is TRUE. This means any text drawn in graphics mode forms random dots because the text is being put directly into screen memory. However, if DIRECTVIDEO is FALSE, then TP 4.0 uses the BIOS calls to write to the screen. These BIOS calls know about the graphics modes, and displays the text properly. ______________________________________________________________________________ | Kevin Lowey |The above is the personal opinion of Kevin | | University of Saskatchewan |Lowey. It does not reflect the position of| | Computing Services |the University of Saskatchewan in any way. | | SaskTel: (306) 966-4826 | | | Bitnet:LOWEY@SASK. (preferred) |I am in no way affiliated with any of the | | UUCP: ihnp4!sask!lowey.uucp |above mentioned companies other than U of S| |________________________________|___________________________________________|