home *** CD-ROM | disk | FTP | other *** search
/ Inside Multimedia 1995 August / IMM0895.BIN / magazin / optix / disk1 / optxppac.set / FILL.OPT < prev    next >
Text File  |  1995-06-08  |  18KB  |  694 lines

  1.  
  2. def(sc,236)
  3. def(i)
  4. def(j)
  5. def(cnt)
  6. def(modus,1)
  7. def(fillcnt)
  8. def(fillcol)
  9. def(qx,165)
  10. def(qy,250)
  11. def(ix)
  12. def(iy)
  13. def(x)
  14. def(y)
  15.  
  16. procedure waitmouse
  17.  locals(x,y,k,flag)
  18.  x:=mousex
  19.  y:=mousey
  20.  k:=mousek
  21.  repeat
  22.    flag:=0
  23.    if mousex=x
  24.      if mousey=y
  25.        if mousek=k
  26.          if keypressed=0
  27.            flag:=true
  28.          endif
  29.        endif
  30.      endif
  31.    endif
  32.  until flag=0
  33. return
  34.  
  35. procedure bit(x,y,col1,col2,col3)
  36.   disk(x  ,y  ,5,col1)
  37.   disk(x-1,y-1,4,col2)
  38.   disk(x-2,y-2,1,col3)
  39. return
  40.  
  41. procedure rbox(m,xl,yo,xr,yu)
  42.   locals(i,j)
  43.   j:=vcolor
  44.   if m=0
  45.     viewport(xl+(yu-yo)/2,yo,xr-(yu-yo)/2,yu)
  46.     cbox(0,bcolor,0)
  47.     disk(xl+(yu-yo)/2,yo+(yu-yo)/2,(yu-yo)/2,vcolor)
  48.     disk(xr-(yu-yo)/2,yo+(yu-yo)/2,(yu-yo)/2,vcolor)
  49.     circle(xl+(yu-yo)/2,yo+(yu-yo)/2,(yu-yo)/2,bcolor)
  50.     circle(xr-(yu-yo)/2,yo+(yu-yo)/2,(yu-yo)/2,bcolor)
  51.     viewport(xl+(yu-yo)/2,yo+1,xr-(yu-yo)/2,yu-1)
  52.     cbox(0,vcolor,0)
  53.     for i:=0 to 30 do
  54.       line(xr-(yu-yo)/2-i,yu-1,xr-(yu-yo)/2+10,yu+20,0)
  55.     next(i)
  56.     setcolor(bcolor)
  57.     line(xr-(yu-yo)/2,yu,xr-(yu-yo)/2+10,yu+20,0)
  58.     line(xr-(yu-yo)/2-30,yu,xr-(yu-yo)/2+10,yu+20,0)
  59.     setcolor(j)
  60.   else
  61.     viewport(xl,yo+(xr-xl)/2,xr,yu-(xr-xl)/2)
  62.     cbox(0,bcolor,0)
  63.     disk(xl+(xr-xl)/2,yo+(xr-xl)/2,(xr-xl)/2,vcolor)
  64.     disk(xl+(xr-xl)/2,yu-(xr-xl)/2,(xr-xl)/2,vcolor)
  65.     circle(xl+(xr-xl)/2,yo+(xr-xl)/2,(xr-xl)/2,bcolor)
  66.     circle(xl+(xr-xl)/2,yu-(xr-xl)/2,(xr-xl)/2,bcolor)
  67.     viewport(xl+1,yo+(xr-xl)/2,xr-1,yu-(xr-xl)/2)
  68.     cbox(0,vcolor,0)
  69.     for i:=0 to 30 do
  70.       line(xr-1,yu-(xr-xl)/2-i,xr+20,yu-(xr-xl)/2+10,0)
  71.     next(i)
  72.     setcolor(bcolor)
  73.     line(xr,yu-(xr-xl)/2,xr+20,yu-(xr-xl)/2+10,0)
  74.     line(xr,yu-(xr-xl)/2-30,xr+20,yu-(xr-xl)/2+10,0)
  75.     setcolor(j)
  76.   endif
  77. return
  78.  
  79. procedure frame(xl,yo,xr,yu,col,dick)
  80.   locals(i,j)
  81.   viewport(xl,yo,xr,yu)
  82.   for i:=1 to dick/2 do
  83.     setcolor(col+i-1)
  84.     rectangle
  85.     incviewport
  86.   next(i)
  87.   if (dick/2)*2<>dick
  88.     incviewport
  89.   endif
  90.   for j:=1 to dick/2 do
  91.     setcolor(col+i-j)
  92.     rectangle
  93.     incviewport
  94.   next(j)
  95. return
  96.  
  97. procedure ffill(x,y,xo,yo,c,f)
  98.   rem ***
  99.   rem *** Muster-Filling (max. Rekursionstiefe = 1000 Durchläufe)
  100.   rem *** benutzt zum Füllen die angegebene Füllfarbe 'f' und
  101.   rem *** geht von der Ausgangsfarbe 'c' an Pos. 'x,y' aus.
  102.   rem *** 'xo, yo' =Rasteroffsets.
  103.  
  104.   locals(v)
  105.  
  106.   inc(fillcnt,1)
  107.   if mousek<>2
  108.     if fillcnt<1000
  109.       setcolor(f)
  110.       getpixel(x,y,v)
  111.       if v=c
  112.         if v<>f
  113.          plot(x,y)
  114.          ffill(x+xo,y   ,xo,yo,c,f)
  115.          ffill(x   ,y+yo,xo,yo,c,f)
  116.          ffill(x+xo,y+yo,xo,yo,c,f)
  117.          ffill(x-xo,y   ,xo,yo,c,f)
  118.          ffill(x-xo,y+yo,xo,yo,c,f)
  119.          ffill(x   ,y-yo,xo,yo,c,f)
  120.          ffill(x-xo,y-yo,xo,yo,c,f)
  121.          ffill(x+xo,y-yo,xo,yo,c,f)
  122.         endif
  123.       endif
  124.     endif
  125.   endif
  126.   dec(fillcnt,1)
  127. return
  128.  
  129. procedure afill(x,y,c,f,o)
  130.   rem ***
  131.   rem *** Color-Filling (max. Rekursionstiefe = 1000 Durchläufe)
  132.   rem *** benutzt zum Füllen die angegebene Füllfarbe 'f' und
  133.   rem *** geht von der Ausgangsfarbe 'c' an Pos. 'x,y' aus. Mit 'o'
  134.   rem *** kann bei der Punktanalyse zusätzlich eine max. Farbabweichung
  135.   rem *** von 'c' um 'o' Farbstufen eingestellt werden. Es wird dann
  136.   rem *** also nicht nur Farbe 'c' gefüllt, sondern auch von Farbe
  137.   rem *** 'c-o' bis Farbe 'c+o'.
  138.  
  139.   locals(v,i,flag)
  140.  
  141.   inc(fillcnt,1)
  142.   if mousek<>2
  143.     if fillcnt<1000
  144.       setcolor(f)
  145.       getpixel(x,y,v)
  146.       for i:=c-o to c+o do
  147.         if v=i
  148.           flag:=1
  149.         endif
  150.       next(i)
  151.       if flag<>0
  152.         if v<>f
  153.           plot(x,y)
  154.           afill(x+1,y  ,c,f,o)
  155.           afill(x+1,y-1,c,f,o)
  156.           afill(x  ,y+1,c,f,o)
  157.           afill(x+1,y+1,c,f,o)
  158.           afill(x-1,y  ,c,f,o)
  159.           afill(x-1,y+1,c,f,o)
  160.           afill(x  ,y-1,c,f,o)
  161.           afill(x-1,y-1,c,f,o)
  162.         endif
  163.       endif
  164.     endif
  165.   endif
  166.   dec(fillcnt,1)
  167. return
  168.  
  169. procedure xfill(x,y,c)
  170.   rem ***
  171.   rem *** X-Muster-Filling (max. Rekursionstiefe = 1000 Durchläufe)
  172.   rem *** Benutzt zum Füllen die aktuelle SETCOLOR-Farbe, sucht diagonal
  173.   rem *** und geht von der Ausgangsfarbe 'c' an Pos. 'x,y' aus.
  174.  
  175.   locals(v)
  176.  
  177.   inc(fillcnt,1)
  178.   if mousek<>2
  179.     if fillcnt<1000
  180.       getpixel(x,y,v)
  181.       if v=c
  182.         plot(x,y)
  183.         xfill(x+1,y+1,c)
  184.         xfill(x-1,y+1,c)
  185.         xfill(x-1,y-1,c)
  186.         xfill(x+1,y-1,c)
  187.       endif
  188.     endif
  189.   endif
  190.   dec(fillcnt,1)
  191. return
  192.  
  193. procedure do_fill(x,y,c)
  194.   rem ***
  195.   rem *** Color-Filling (max. Rekursionstiefe = 1000 Durchläufe)
  196.   rem *** benutzt zum Füllen die angegebene Farbe 'c' und
  197.   rem *** geht von der Startposition 'x,y' aus.
  198.  
  199.   locals(v)
  200.  
  201.   inc(fillcnt,1)
  202.   if mousek<>2
  203.     if fillcnt<1000
  204.       getpixel(x,y,v)
  205.       if v=fillcol
  206.         if v<>c
  207.           plotc(x,y,c)
  208.           do_fill(x+1,y  ,c)
  209.           do_fill(x+1,y-1,c)
  210.           do_fill(x  ,y+1,c)
  211.           do_fill(x+1,y+1,c)
  212.           do_fill(x-1,y  ,c)
  213.           do_fill(x-1,y+1,c)
  214.           do_fill(x  ,y-1,c)
  215.           do_fill(x-1,y-1,c)
  216.         endif
  217.       endif
  218.     endif
  219.   endif
  220.   dec(fillcnt,1)
  221. return
  222. procedure fill(x,y,c)
  223.   getpixel(x,y,fillcol)
  224.   do_fill(x,y,c)
  225. return
  226.  
  227. procedure bfill(x,y)
  228.   rem ***
  229.   rem *** Bereichs-Color-Filling mit (max. Rekursionstiefe = 1000 Durchläufe)
  230.   rem *** benutzt zum Füllen die aktuelle SETCOLOR-Farbe und wird nur
  231.   rem *** durch die aktuelle SETBCOLOR-Farbe begrenzt. Der Prozess startet
  232.   rem *** an Position 'x,y'.
  233.  
  234.   locals(v)
  235.  
  236.   inc(fillcnt,1)
  237.   if mousek<>2
  238.     if fillcnt<1000
  239.       getpixel(x,y,v)
  240.       bound(x,0,xmax)
  241.       bound(y,0,ymax)
  242.       if v<>bcolor
  243.         if v<>vcolor
  244.           plot(x,y)
  245.           bfill(x+1,y)
  246.           bfill(x+1,y-1)
  247.           bfill(x  ,y+1)
  248.           bfill(x+1,y+1)
  249.           bfill(x-1,y)
  250.           bfill(x-1,y+1)
  251.           bfill(x  ,y-1)
  252.           bfill(x-1,y-1)
  253.         endif
  254.       endif
  255.     endif
  256.   endif
  257.   dec(fillcnt,1)
  258. return
  259.  
  260. procedure cfill(x,y,col1,col2)
  261.   rem ***
  262.   rem *** Bereichs-Color-Filling mit (max. Rekursionstiefe = 1000 Durchläufe)
  263.   rem *** benutzt zum Füllen die aktuelle SETCOLOR-Farbe und füllt nur die
  264.   rem *** Bereiche, die innerhalb des Farbbereichs von 'col1' bis 'col2'
  265.   rem *** liegen. Der Füllprozess startet an Position 'x,y'.
  266.  
  267.   locals(v)
  268.  
  269.   inc(fillcnt,1)
  270.   if mousek<>2
  271.     if fillcnt<1000
  272.       getpixel(x,y,v)
  273.       bound(x,0,xmax)
  274.       bound(y,0,ymax)
  275.       if v<=col2
  276.         if v>=col1
  277.           if v<>vcolor
  278.             plot(x,y)
  279.             cfill(x+1,y  ,col1,col2)
  280.             cfill(x+1,y-1,col1,col2)
  281.             cfill(x  ,y+1,col1,col2)
  282.             cfill(x+1,y+1,col1,col2)
  283.             cfill(x-1,y  ,col1,col2)
  284.             cfill(x-1,y+1,col1,col2)
  285.             cfill(x  ,y-1,col1,col2)
  286.             cfill(x-1,y-1,col1,col2)
  287.           endif
  288.         endif
  289.       endif
  290.     endif
  291.   endif
  292.   dec(fillcnt,1)
  293. return
  294.  
  295. procedure rfill(x,y,c)
  296.   rem ***
  297.   rem *** Restore-Filling (max. Rekursionstiefe = 1000 Durchläufe)
  298.   rem *** benutzt zum Füllen das entsprechende Pixel des Hintergrund-
  299.   rem *** (Restore-) Speichers
  300.  
  301.   locals(v)
  302.  
  303.   inc(fillcnt,1)
  304.   if mousek<>2
  305.     if fillcnt<1000
  306.       getpixel(x,y,v)
  307.       if v=c
  308.         restoreline(x,y,x,y,0)
  309.         rfill(x+1,y  ,c)
  310.         rfill(x  ,y+1,c)
  311.         rfill(x+1,y+1,c)
  312.         rfill(x-1,y  ,c)
  313.         rfill(x-1,y+1,c)
  314.         rfill(x  ,y-1,c)
  315.         rfill(x-1,y-1,c)
  316.         rfill(x+1,y-1,c)
  317.       endif
  318.     endif
  319.   endif
  320.   dec(fillcnt,1)
  321. return
  322.  
  323.  
  324. procedure pfill(x,y,x2,y2,c)
  325.   rem ***
  326.   rem *** Quellpixel-Filling (max. Rekursionstiefe = 1000 Durchläufe)
  327.   rem *** benutzt zum Füllen das entsprechende Pixel des Quellbereichs
  328.   rem ****
  329.   rem *** x ,y : Ausgangs-Koordinaten des Füllbereichs
  330.   rem *** x2,y2: Ausgangs-Koordinaten des Quellbereichs
  331.  
  332.   locals(v,v2)
  333.  
  334.   inc(fillcnt,1)
  335.   if mousek<>2
  336.     if fillcnt<1000
  337.       getpixel(x,y,v)
  338.       if v=c
  339.         getpixel(x2,y2,v2)
  340.         if v<>v2
  341.           plotc(x,y,v2)
  342.           pfill(x+1,y  ,x2+1,y2  ,c)
  343.           pfill(x+1,y-1,x2+1,y2-1,c)
  344.           pfill(x  ,y+1,x2  ,y2+1,c)
  345.           pfill(x+1,y+1,x2+1,y2+1,c)
  346.           pfill(x-1,y  ,x2-1,y2  ,c)
  347.           pfill(x-1,y-1,x2-1,y2-1,c)
  348.           pfill(x  ,y-1,x2  ,y2-1,c)
  349.           pfill(x-1,y+1,x2-1,y2+1,c)
  350.         endif
  351.       endif
  352.     endif
  353.   endif
  354.   dec(fillcnt,1)
  355. return
  356.  
  357. procedure cpfill(x,y,x2,y2,col1,col2)
  358.   rem ***
  359.   rem *** Bereichs-Quellpixel-Filling mit (max. Rekursionstiefe = 1000
  360.   rem *** Durchläufe), benutzt zum Füllen das entsprechende Pixel des
  361.   rem *** Quellbereichs und füllt nur die Bereiche, die innerhalb des
  362.   rem *** Farbbereichs von 'col1' bis 'col2' liegen. Der Füllprozess
  363.   rem *** startet an Position 'x,y' und beginnt im Quellbereich an den
  364.   rem *** Ausgangskoordinaten 'x2,y2'
  365.  
  366.   locals(v,v2)
  367.  
  368.   inc(fillcnt,1)
  369.   if mousek<>2
  370.     if fillcnt<1000
  371.       bound(x,0,xmax)
  372.       bound(y,0,ymax)
  373.       getpixel(x,y,v)
  374.       if v<=col2
  375.         if v>=col1
  376.           getpixel(x2,y2,v2)
  377.           if v<>v2
  378.             plotc(x,y,v2)
  379.             cpfill(x+1,y  ,x2+1,y2  ,col1,col2)
  380.             cpfill(x+1,y-1,x2+1,y2-1,col1,col2)
  381.             cpfill(x  ,y+1,x2  ,y2+1,col1,col2)
  382.             cpfill(x+1,y+1,x2+1,y2+1,col1,col2)
  383.             cpfill(x-1,y  ,x2-1,y2  ,col1,col2)
  384.             cpfill(x-1,y-1,x2-1,y2-1,col1,col2)
  385.             cpfill(x  ,y-1,x2  ,y2-1,col1,col2)
  386.             cpfill(x-1,y+1,x2-1,y2+1,col1,col2)
  387.           endif
  388.         endif
  389.       endif
  390.     endif
  391.   endif
  392.   dec(fillcnt,1)
  393. return
  394.  
  395.  
  396. begin
  397.  
  398.   readsound('loop.voc')
  399.   soundloop(on)
  400.   startsound
  401.   readfont(1,'tri22n.fnt')
  402.   font(1)
  403.   readpic('orca.tga')
  404.   setallpal
  405.   clearscreen(56)
  406.   keycol(126)
  407.   key(on)
  408.   setpstd
  409.   setsubpal(15)
  410.   gradation(231,239,2,5,4,32,63,56)
  411.   textcofs(-2)
  412.  
  413.   textcolor(252)
  414.   setrgbcolor(21,20,26,252)
  415.   printat(445,30,'Rettet')
  416.   printat(445,60,'die Wale')
  417.   sysfont(2,1)
  418.   font(0)
  419.  
  420.   for i:=0 to 42 do
  421.     setrgbcolor(21+i,20-i/2,26-i/2,252)
  422.     pause(50)
  423.   next(i)
  424.   setcolor(208)
  425.   setrgbcolor(21,20,26,208)
  426.   printc(249,150,'Eines der größten Tiere, die jemals auf diesem prächtigen')
  427.   printc(249,170,'Planeten ERDE gelebt haben - und das heute noch lebt -')
  428.   printc(249,190,'ist der Blauwal. Er wird über 30 (!) Meter lang und bis')
  429.   printc(249,210,'zu 150 Tonnen schwer (soviel wie ca. 35 ausgewachsene')
  430.   printc(249,230,'Elefanten). Der schnellste Mensch der Welt müßte ca. drei')
  431.   printc(249,250,'Sekunden in Höchstgeschwindigkeit laufen, um von der')
  432.   printc(249,270,'Schwanzspitze bis zum Maul des Wals zu gelangen, in das')
  433.   printc(249,290,'-sage und schreibe- ein ganzes Einfamilienhaus hineinpaßt.')
  434.  
  435.   printc(249,330,'Er wurde durch eine erbarmungslose Ausrottungsmaschinerie')
  436.   printc(249,350,'im Laufe der letzten 150 Jahre global von ca. 650.000 bis')
  437.   printc(249,370,'auf ca. ganze 2.000 Exemplare dezimiert. Stellen Sie sich')
  438.   printc(249,390,'nun bitte für jeden (!) einzelnen Punkt auf dem Bildschirm')
  439.   printc(249,410,'(ca. 310.000) zwei Blauwale vor - und drücken nun eine')
  440.   printc(249,430,'<Taste> um zu sehen, welch - fast - verschwindende Anzahl')
  441.   printc(249,450,'heute davon noch übrig geblieben ist.')
  442.   for i:=0 to 25 do
  443.     setrgbcolor(21+i,20+(i*37/26),26+(i*33/26),208)
  444.     pause(10)
  445.   next(i)
  446.   pause(120000)
  447.   for i:=0 to 25 do
  448.     setrgbcolor(46-i,57-(i*37/25),59-(i*33/25),208)
  449.     pause(30)
  450.   next(i)
  451.   getpal
  452.   wait(500)
  453.   fadeout(1)
  454.   clearscreen(146)
  455.   fadein(1)
  456.   setrgbcolor(46,57,59,208)
  457.   cnt:=0
  458.   repeat
  459.     random(xmax/10+10,ix)
  460.     random(ymax/10+10,iy)
  461.     getpixel(ix*10+5,iy*10+5,sc)
  462.     if sc<>0
  463.      inc(cnt,1)
  464.      viewport(ix*10,iy*10,ix*10+9,iy*10+9)
  465.      cbox(0,0,0)
  466.     endif
  467.   until cnt>4760
  468.  
  469.   repeat
  470.   until readkey+mousek=0
  471.   pause(3000)
  472.  
  473.   font(1)
  474.   setcolor(122)
  475.   for i:=0 to xmax step 5 do
  476.     line(0,i,xmax,i,0)
  477.     line(i,0,i,xmax,0)
  478.   next(i)
  479.   for i:=50 to 400 step 2 do
  480.     setcolor(39+i/2)
  481.     line(20,i,420,i,0)
  482.     line(20,i+1,420,i+1,0)
  483.   next(i)
  484.  
  485.   scrtobuf
  486.   viewport(50+winx,99,59+winx,99+winy)
  487.   cbox(9,0,0)
  488.   viewport(59,89+winy,59+winx,99+winy)
  489.   cbox(9,0,0)
  490.   viewport(49,89,50+winx,90+winy)
  491.   plateau(255,50)
  492.  
  493.   frame(20,50,420,400,231,18)
  494.   disk(200,216,120,245)
  495.   disk(200,216,113,252)
  496.   disk(200,216,106, 84)
  497.   disk(200,216, 99,254)
  498.   disk(200,216, 92,250)
  499.   disk(200,216, 85,249)
  500.   disk(200,216, 78,241)
  501.   disk(200,216, 71,244)
  502.  
  503.   loadwin(50,90,0,0)
  504.   showpalette(442,304,2)
  505.   copywin(442,304,634,416)
  506.   key(off)
  507.  
  508.   for i:=0 to winy-1 do
  509.     loadsprite(0,i,442,192+i*2,winx,2)
  510.   next(i)
  511.   key(on)
  512.  
  513.   copywin(20,438,300,473)
  514.   keycol(56)
  515.   setcolor(255)
  516.   loadwin(19,434,16,0)
  517.   setcolor(0)
  518.   loadwin(21,436,16,0)
  519.   setcolor(78)
  520.   loadwin(20,435,17,0)
  521.   textcolor(255)
  522.   textcofs(0)
  523.   printat(29,432,'OPTIX - Filling')
  524.   textcolor(0)
  525.   printat(31,434,'OPTIX - Filling')
  526.   textcolor(178)
  527.   printat(30,433,'OPTIX - Filling')
  528.   sysfont(0,1)
  529.   font(0)
  530.   setcolor(255)
  531.   printat(320,436,'rechte Maustaste        = Farb-Auswahl')
  532.   printat(320,448,'linke  Maustaste        = Füll-Start')
  533.   printat(320,460,'rechte Maustaste halten = Füll-Abbruch')
  534.   cnt:=0
  535.  
  536.   disk(570,150,24,0)
  537.   disk(565,145,22,200)
  538.   disk(565,145,15,220)
  539.   pfill(565,127,310,140,200)
  540.  
  541.   defbutton(445, 33,75,20,15,1,0,1,'1','dummy')
  542.   defbutton(445, 55,75,20,15,1,0,1,'1','dummy')
  543.   defbutton(445, 77,75,20,15,1,0,1,'1','dummy')
  544.   defbutton(445, 99,75,20,15,1,0,1,'1','dummy')
  545.   defbutton(445,121,75,20,15,1,0,1,'1','dummy')
  546.   defbutton(445,143,75,20,15,1,0,1,'1','dummy')
  547.   defbutton(445,165,75,20,15,1,0,1,'1','dummy')
  548.   setcolor(0)
  549.   printat(452, 37,'FILL')
  550.   printat(452, 59,'BFILL')
  551.   printat(452, 81,'XFILL')
  552.   printat(452,103,'AFILL')
  553.   printat(452,126,'CPFILL')
  554.   printat(452,147,'FFILL')
  555.   printat(452,169,'CFILL')
  556.   fill(46 ,450,249)
  557.   fill(55 ,450,250)
  558.   fill(82 ,450,251)
  559.   fill(97 ,450,252)
  560.   fill(114,450,254)
  561.   rem     checkbutton('dummy',1,0)    *** in dieser Demo eigentlich unnötig,
  562.   rem                                 *** wäre hier nur zum Aufräumen der
  563.   rem                                 *** DEFBUTTON-Objektkette sinnvoll
  564.   :dummy
  565.  
  566.   scrtobuf
  567.   curson(mousex,mousey)
  568.   bit(511,43+(modus-1)*22,244,252,255)
  569.  
  570.   repeat
  571.  
  572.      inbox(445,33,520,190,j)
  573.      if j:=false
  574.        waitmouse
  575.      endif
  576.      cursoff
  577.  
  578.      for i:=0 to 6 do
  579.        inbox(445,33+i*22,520,33+i*22+20,j)
  580.        if j:=true
  581.         if mousek=1
  582.          modus:=i+1
  583.          viewport(447,35+i*22,518,31+i*22+20)
  584.          plateau(240,255)
  585.          wait(100)
  586.          plateau(255,248)
  587.          viewport(445,33,520,190)
  588.          restorebox(0,0)
  589.          bit(511,43+i*22,244,252,255)
  590.          setcolor(255)
  591.          j:=30+i*22
  592.          rbox(0,230,j-44,470,j-6)
  593.          setcolor(240)
  594.          if i+1=1
  595.           printc(350,j-28,'Standard-')
  596.           printc(350,j-16,'Filling')
  597.          endif
  598.          if i+1=2
  599.           printc(350,j-34,'Bereichsfill - wird')
  600.           printc(350,j-24,'nur durch BCOLOR')
  601.           printc(350,j-14,'(hier: 231) begrenzt')
  602.          endif
  603.          if i+1=3
  604.           printc(350,j-34,'X-Musterfill - erzeugt')
  605.           printc(350,j-24,'eine Punktraster mit')
  606.           printc(350,j-14,'VCOLOR im Füllbereich')
  607.          endif
  608.          if i+1=4
  609.           printc(350,j-34,'Bereichsfill - arbeitet')
  610.           printc(350,j-24,'mit Offset zur Ausgangs-')
  611.           printc(350,j-14,'farbe (hier: 3)')
  612.          endif
  613.          if i+1=5
  614.           printc(350,j-34,'Quellbereichsfill-begrenzt')
  615.           printc(350,j-24,'nur durch col1/col2 (0-96)')
  616.           printc(350,j-14,'füllt m.AnalogQuellpixeln')
  617.          endif
  618.          if i+1=6
  619.           printc(350,j-34,'Rasterfill - Farbfill,')
  620.           printc(350,j-24,'füllt in einem einstell-')
  621.           printc(350,j-14,'baren X/Y-Offsetraster')
  622.          endif
  623.          if i+1=7
  624.           printc(350,j-34,'Füllt nur die Farben, die')
  625.           printc(350,j-24,'im Bereich "col1" bis "col2"')
  626.           printc(350,j-14,'(hier: 128 ... 230) liegen')
  627.          endif
  628.          waitmouse
  629.          viewport(230,j-44,470,j+15)
  630.          restorebox(0,0)
  631.         endif
  632.  
  633.        endif
  634.      next(i)
  635.  
  636.      if keypressed<>0
  637.        repeat
  638.        until readkey+mousek=0
  639.      endif
  640.      ix:=mousex
  641.      iy:=mousey
  642.  
  643.      getpixel(ix,iy,i)
  644.  
  645.      disk(xmax-20,20,20,sc)
  646.      circle(xmax-20,20,20,i)
  647.      disk(xmax-20,20,13,i)
  648.      printc(xmax-20,20,str(i,3))
  649.  
  650.      inbox(445,33,520,190,j)
  651.      if j=0
  652.       if mousek=1
  653.         noise(1200,2)
  654.         setcolor(sc)
  655.         setbcolor(231)
  656.         if modus=1
  657.           fill(ix,iy,sc)
  658.         endif
  659.         if modus=2
  660.           bfill(ix,iy)
  661.         endif
  662.         if modus=3
  663.           xfill(ix,iy,i)
  664.         endif
  665.         if modus=4
  666.           afill(ix,iy,i,sc,3)
  667.         endif
  668.         if modus=5
  669.           cpfill(ix,iy,qx,qy,0,96)
  670.         endif
  671.         if modus=6
  672.           ffill(ix,iy,2,2,i,sc)
  673.         endif
  674.         if modus=7
  675.           cfill(ix,iy,128,230)
  676.         endif
  677.         bit(511,43+(modus-1)*22,247,247,247)
  678.         scrtobuf
  679.         bit(511,43+(modus-1)*22,244,252,255)
  680.       endif
  681.      endif
  682.  
  683.      if mousek=2
  684.         qx:=mousex
  685.         qy:=mousey
  686.         getpixel(qx,qy,sc)
  687.      endif
  688.      curson(mousex,mousey)
  689.  
  690.   until mousek=3
  691.  
  692.  
  693. end
  694.