home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!pc110-02.insa-lyon.fr!ppollet
- From: ppollet@cismibm.univ-lyon1.fr (Patrick POLLET)
- Newsgroups: comp.lang.pascal
- Subject: Re: 2 Questions about Graphic under TurboPascal6
- Date: Tue, 5 Jan 1993 17:28:13 GMT
- Organization: INSA CENTRE INFORMATIQUE DU 1er CYCLE
- Lines: 69
- Message-ID: <ppollet.117.726254893@cismibm.univ-lyon1.fr>
- References: <1993Jan4.225959.311@sinus.stgt.sub.org>
- NNTP-Posting-Host: pc110-02.insa-lyon.fr
-
- In article <1993Jan4.225959.311@sinus.stgt.sub.org> stefan@sinus.stgt.sub.org (Stefan Bechtold) writes:
- >From: stefan@sinus.stgt.sub.org (Stefan Bechtold)
- >Subject: 2 Questions about Graphic under TurboPascal6
- >Date: Mon, 4 Jan 1993 22:59:59 GMT
-
- >Hi !
-
- >I've two questions about the graphic mode under Turbo Pascal 6.0:
-
- >1) What I want to do is to move a rectangle on the screen;
- > How can I do this ? If I use, e.g., a
- > for i:=1 to 10 do
- > rectangle(i,i,4*i,4*i)
- > I get 10 rectangles drawn together; but what I want is that
- > they only appear for a certain time and then get removed
- > (so that is appear as if the rectangle would move from i,i to
- > 10*i,10*i).
-
-
- Works in XOR mode :
- When you draw an object twice in XorMode it restores the part
- of the screen it was on :
-
- Something like: (by memory check for mispellings !)
-
- SetWritemode(XORPUT);
- For I:= 1 to 10 do
- begin
- Rectangle(I,I,I*10,I*10); (* draw it once *)
- Delay (10); (*wait a bit *)
- If I <>10 then
- Rectangle (I,I,I*10,I*10) (*erase it if not a last
- position*)
- end;
-
-
-
-
- >2) I'm working on a program which often redraws the screen.
- > Is there any possiblity to clear only certain figures/parts
- > of the screen so that others remain on the screen ?
- > (I've a matrix and something writen on that; what I want is that
- > the matrix remains on the screen and only the other stuff will
- > be rewritten)
-
- By playing with SetViewport(),ClearViewport() you should be able to
- selectiveley erase some rectangular aera of the screen
- There is an example at ClearViewport entry in the TP6 programmer
- reference manual
-
-
-
- >Thank you very much,
- >Stefan
- >--
- >+ Stefan Bechtold # stefanb@delos.stgt.sub.org # Voice +49 711 813240 +
- >++++++++sed nemo potuit tangere: merda fuit ! (Martial III 17)+++++++++
-
- ppollet@cismibm.univ-lyon1.fr (Patrick POLLET)
- --------------------------------------------------------
- Dr Patrick L.Pollet
- Institut National des Sciences Appliquees
- Centre Informatique du 1er Cycle Bat 110
- 20 Avenue A.Einstein
- 69621 Villeurbanne Cedex France
- --------------------------------------------------------
- Phone: 72 43 83 80 - la premiere erreur c'est
- Fax : 72 43 85 33 - de se lever le matin ... GASTON
- -------------------------------------------------------
-