home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / windows / intervie / 3651 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.8 KB

  1. Path: sparky!uunet!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!IUS4.IUS.CS.CMU.EDU!jayg
  2. From: jayg+@CS.CMU.EDU (Jay Gowdy)
  3. Newsgroups: comp.windows.interviews
  4. Subject: Raster zooming problems
  5. Message-ID: <C1J240.EMK.1@cs.cmu.edu>
  6. Date: 27 Jan 93 19:28:16 GMT
  7. Article-I.D.: cs.C1J240.EMK.1
  8. Sender: news@cs.cmu.edu (Usenet News System)
  9. Organization: Carnegie Mellon University
  10. Lines: 19
  11. Nntp-Posting-Host: ius4.ius.cs.cmu.edu
  12.  
  13. I'm having a problem with zooming rasters.  I have a HUGE raster (aproximately 1200x1200, it's derived from a Digital Terrain Elevation Data map).  I put inside a nifty scrolling/zooming viewport that I've written and it scrolls nicely.
  14.  
  15. The raster also zooms nicely, albeit slowly, up to a point.  After expanding or shrinking too much, I run into problems.  Here's the symptoms:
  16.  
  17. Hit shrink button, wait for a year, nicely shrunk
  18. Hit shrink button, go to lunch, yep, it's smaller
  19. Hit shrink button, read net news, does OK
  20. .
  21. .
  22. Hit shrink button, then immediately the raster is redrawn, same size, just offset.  
  23.  
  24. Taking a look at the code (xcanvas.c, tx_raster(), lines 845-950), it seems that after you zoom a raster, the resulting raster gets stored in a hash table, keyed by the transformation that put it there.  The problem I'm having seems to result from the fact that tx_key responds with the same key for the old and new transformation matrices.  The Table2 hash table doesn't seem to compare values, just keys, and thus, instead of generating the new raster for the shrunk map, tx_raster says, "great, I can use the
  25.  
  26.  
  27.  
  28.  
  29.  previous raster and get a faster update."  So it quickly and efficiently returns the wrong raster.
  30.  
  31. This happens upon extreme enlargments as well.
  32.  
  33. I'm not completely sure this is the cause of my problems, but it fits the symptoms.  What can I do to change this?  Is it a bug or a feature?
  34.  
  35.                 Jay
  36.