home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / atari / st / tech / 6302 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  5.0 KB

  1. Path: sparky!uunet!mcsun!uknet!gdt!aber!hrs
  2. From: hrs@aber.ac.uk (Herbert Martin Sauro)
  3. Newsgroups: comp.sys.atari.st.tech
  4. Subject: Re: Sending objc_draw to a memory buffer rather than screen
  5. Message-ID: <1992Dec11.124441.5775@aber.ac.uk>
  6. Date: 11 Dec 92 12:44:41 GMT
  7. References: <memo.794901@cix.compulink.co.uk> <1992Dec10.131157.1863@jet.uk>
  8. Organization: University of Wales, Aberystwyth
  9. Lines: 84
  10.  
  11. In article <1992Dec10.131157.1863@jet.uk> djs@jet.uk (David J Stevenson) writes:
  12. >In <memo.794901@cix.compulink.co.uk> apelled@cix.compulink.co.uk (Adam Pelled) writes:
  13. >
  14. >
  15. >>In article <1992Dec7.171606.23964@aber.ac.uk>, hrs@aber.ac.uk (Herbert Martin Sauro) writes:
  16. >>>I'm trying to write a scrollable list box. I've gone through a number of
  17. >>>attempts. The best one so far was blitting n-1 of the entries in the list
  18. >>>and writing the nth item using objc_draw as the list is scrolled. 
  19. >>>The trouble with this was if
  20. >>>the user scrolled more than one item at a time this method no longer worked
  21. >>>and instead the whole list box had to be redrawn (i.e using objc_draw) 
  22. >>>at the new position - which makes for flickering and it's slow. 
  23. >>>If the list box only moves one item at a time
  24. >>>the n-1 blit method works a treat and without any flicker -- the list
  25. >>>can also scroll pretty fast.
  26. >
  27. >>    Can't you vsync ? And what's wrong with a window ?
  28. >I don't think that he meant the sort of flicker you can get when updating the
  29. >screen as it's being displayed.  I suspect the apparent flicker is caused
  30. >by clearing the redraw rect before drawing the text.
  31.  
  32. The sort of flicker I mean't is as follows. If you have the CPX
  33. that controls the device drivers for the new FontGDOS then do the
  34. following. Scroll through the device numbers using the up and down 
  35. arrow boxes and you will find that the
  36. objects flicker around the edges. Personally I think this is poor
  37. presentation (poor programming?) - I mean MS-windows doesn't flicker
  38. like that so why should GEM. 
  39.  
  40. >
  41. >>>I'm now thinking of another method, this time to hold the entire list
  42. >>>(or at least the section that is being displayed) in a memory buffer
  43. >>>and as the list is scrolled just blit the appropriate section out to
  44. >>>the screen. The trouble I'm having is how do I get such a list into 
  45. >>>a memory buffer in the first place. It's a shame that one can't redirect
  46. >>>the output from the objc_draw command to a memory buffer rather than
  47. >>>the screen (or can one?). So the question is, how can one store dialogs,
  48. >>>sections of object trees etc in memory (as bit maps I mean) so that they
  49. >>>can be blitted out to the screen at will?
  50. >
  51. >>    Yes you can redirect objc_draw() output by changing the screen physical
  52. >>address. Of course it won't speed anything up, in fact it'll be slower plus
  53. >>you'll soak up RAM. Xcontrl list boxes scroll o.k with a decent accelerator.
  54. >NO, you should not change screen addresses, or you'll blow up with MultiTOS, or
  55. >with some graphics boards or with n other things.
  56. >
  57. >To scroll the window, the method I would recommend is to blit the area that's
  58. >common to the 'before' and 'after' displays, then call your redraw routine
  59. >on the remaining rectangle at the top or bottom of the window.  Blitting,
  60. >(vro_cpyfm) should normally be faster than drawing text, so only redraw the
  61. >whole window when no part is common to the 'before' and 'after' displays,
  62. >eg when the scroller has been 'paged'.
  63. >
  64. >Actually, I didn't quite understand why you were drawing the text with
  65. >objc_draw; is each line in the list box a separate AES object?  The approach
  66. >I use with listboxes is to make the whole of the scrollable area one object
  67. >(a G_BOX), then use VDI functions to draw the text.  By mentioning 'blitting'
  68. >and objc_draw, you imply that you are mixing AES and VDI calls to draw the
  69. >scrollable area.
  70. >-- 
  71. >+---------------------------------------------------+
  72. >| David Stevenson  djs@jet.uk   Tel: +44 235 465028 |
  73. >+---------------------------------------------------+
  74.  
  75. What you describe is essentially what I'm doing, I'm only blitting the things
  76. that are still in the list box before and after I scroll. After that I use
  77. objc_draw to fill in the entries that are actually new to the list box.
  78. Suggesting to use VDI to write out the text seems to be a good idea and
  79. I'll give it a try. I was using a combination of vro_cpyfrm (spelling?)
  80. and objc_draw and yes indeed I have a separate object for each entry which
  81. might not be such a good idea now that you've mentioned it. 
  82.  
  83. By the way David, if I remember wern't you asking me a while ago
  84. about a monitor I was supposed to be getting for a TT (and the memory card!)
  85. well I'm STILL waiting - moral of the story is DON'T DEAL WITH HCS!!!!
  86. (For those not in the know - HCS is an Atari etc distributer in London, U.K.)
  87.  
  88.  
  89. Herb
  90. -- 
  91. /******************************************************************************
  92. Herbert Sauro                                   e-mail: hrs@aber.ac.uk
  93. Biological Sciences                              phone: +44 970 622353
  94. Univesity College of Wales                                                    
  95.