home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / atari / st / tech / 5579 < prev    next >
Encoding:
Text File  |  1992-11-11  |  2.6 KB  |  58 lines

  1. Newsgroups: comp.sys.atari.st.tech
  2. Path: sparky!uunet!mcsun!Germany.EU.net!unidui!rrz.uni-koeln.de!rrz.uni-koeln.de!aeg03
  3. From: aeg03@rrz.uni-koeln.de (Jan T. Kim)
  4. Subject: Re: Raster Copy [for window scrolling]
  5. Message-ID: <1992Nov11.133728.115954@rrz.uni-koeln.de>
  6. Keywords: raster-copy, window, scroll, fast
  7. Reply-To: kim@vax.mpiz-koeln.mpg.dbp.de
  8. Organization: Regional Computing Center, University of Cologne, F. R. Germany
  9. References: <H.KtV1EXXhvs6@elfhaven.ersys.edmonton.ab.ca>
  10. Date: Wed, 11 Nov 92 13:37:28 GMT
  11. Lines: 45
  12.  
  13. In <H.KtV1EXXhvs6@elfhaven.ersys.edmonton.ab.ca> mforget@elfhaven.ersys.edmonton.ab.ca (Michel Forget) writes:
  14.  
  15. >In short (long?) I would be grateful to anyone who could share with me the
  16. >secrets of window scrolling.  The faster, the better.  To keep things legal,
  17. >though, I imagine only VDI calls should be used.
  18.  
  19. It seems to me that you should use the VDI(109)  function,  which
  20. seems  to  be called vro_cpyfm() in standard C libraries. I don't
  21. know though,  whether  this  function  will  work  properly  with
  22. overlapping  rasters,  that  is,  whether you'll have to copy the
  23. raster to some buffer first and then copy it from the  buffer  to
  24. its  destination, or you can copy blocks directly from source tor
  25. destionation.
  26. To be prepared for new tos versions, you should restrict  use  of
  27. this  method  to  the  top  window. I've seen that with MultiTOS,
  28. background windows still have arrows, and I imagine it's horrible
  29. if  you're  trying  to  devise an algorithm that tries to use the
  30. blocks that wades through  a  rectangle  list,  trying  to  reuse
  31. available  fragments  by block copying and filling in the gaps by
  32. drawing.
  33.  
  34. >I have also heard that the speed of output to the window can be increased
  35. >by aligning the window on a sixteen bit boundary?  How would this be done?
  36.  
  37. I never did it, but I figure you could do (in GFA):
  38.  
  39. PROCEDURE align_window(w_handle&,flags&)
  40.   LOCAL x&,y&,w&,h&
  41.   ~WIND_GET(w_handle&,4,x&,y&,w&,h&)
  42.   x&=(x& MOD 16+1)*16
  43.   ~WIND_CALC(0,flags&,x&,y&,w&,h&,x&,y&,w&,h&)
  44.   ~WIND_SET(w_handle&,5,x&,y&,w&,h&)
  45. RETURN
  46.  
  47. This should align the  workspace  of  the  window  by  a  16  bit
  48. boundary.  By  manipulating  w& the same way as x& above, you can
  49. force the window width to be a  multiple  of  16,  which  can  be
  50. convenient with windows containing text.
  51.  
  52. Greetinx, Jan
  53.  
  54.  +- Jan Kim -- X.400:    S=kim;OU=vax;O=mpiz-koeln;P=mpg;A=dbp;C=de -+
  55.  |             Internet: kim@vax.mpiz-koeln.mpg.dbp.de               |
  56.  |                                                                   |
  57.  *----=<  hierarchical systems are for files, not for humans  >=-----*
  58.