GRAPH 
Author Message
 GRAPH

I wrote this code:
uses Crt, Graph;

var
  Gd, Gm: Integer;
  Radius: Integer;
  x, y  : integer;
begin
  Gd := Detect;
  InitGraph(Gd, Gm, 'c:\tpc7\bgi');
  if GraphResult <> grOk then
  Halt(1);
  x:= 100;
  y:= 100;
  repeat
{  x:= random(600)+10;
  y:= random(600)+10;}
  Radius := random(80)+8;
  inc(x, 3);
  inc(y);
  Circle(x, y, Radius * 3);

  until
  KeyPressed;
  CloseGraph;
end.

Now the screens fills itself with circels from left to richt but all i want
is the last written circel , ClrScr; doesn't work well .. anyone has a
better idea?



Wed, 18 Jun 1902 08:00:00 GMT  
 GRAPH
Hi!

Quote:
>Now the screens fills itself with circels from left to richt but all i want
>is the last written circel , ClrScr; doesn't work well .. anyone has a
>better idea?

In BGI graphic modes you have to use ClearDevice in order to clear the screen.
ClrScr works only in text modes.


Wed, 18 Jun 1902 08:00:00 GMT  
 GRAPH

Quote:

> Hi!

> >Now the screens fills itself with circels from left to richt but all i want
> >is the last written circel , ClrScr; doesn't work well .. anyone has a
> >better idea?

> In BGI graphic modes you have to use ClearDevice in order to clear the screen.
> ClrScr works only in text modes.

To erase the previous circle overdraw it in the background colour.

Groeten,

Remco



Wed, 18 Jun 1902 08:00:00 GMT  
 GRAPH
Quote:


> > Hi!

> > >Now the screens fills itself with circels from left to richt but all i want
> > >is the last written circel , ClrScr; doesn't work well .. anyone has a
> > >better idea?

> > In BGI graphic modes you have to use ClearDevice in order to clear the screen.
> > ClrScr works only in text modes.

> To erase the previous circle overdraw it in the background colour.

Or redraw it with XORPut with the same color. :-)
--
Franz Glaser, Glasau 3, A-4191 Vorderweissenbach Austria +43-7219-7035-0
Muehlviertler Elektronik Glaser.  Industrial control and instrumentation
http://members.eunet.at/meg-glaser/    http://members.xoom.com/f_glaser/
http://www.geocities.com/~franzglaser/            http://start.at/bedarf


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. problem with the graph unit-graph.tpu

2. graph unit

3. charts/graphs

4. Graph.tpu replacement

5. table/graph solution, cppbuilder4

6. Graph unit question.

7. Libliaries graph.tpw !!!

8. Patch for Graph Unit of fast PCs

9. TP7 Graph unit, conflicts with windows XP ?

10. Patch for Graph Unit of fast PCs

11. Unit Graph Problem

12. screen-frequency in graph mode

 

 
Powered by phpBB® Forum Software