home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / programm / 12984 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  1.6 KB

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!swrinde!sdd.hp.com!wupost!darwin.sura.net!jvnc.net!netnews.upenn.edu!msuinfo!eecae.ee.msu.edu!griffin
  2. From: griffin@eecae.msu.edu (Dan Griffin)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: ClipBlit() and brushes
  5. Message-ID: <1992Sep2.062319.5418@msuinfo.cl.msu.edu>
  6. Date: 2 Sep 92 06:23:19 GMT
  7. Sender: news@msuinfo.cl.msu.edu
  8. Organization: Michigan State University, College of Engineering, East Lansing
  9. Lines: 26
  10. Originator: griffin@eecae.ee.msu.edu
  11.  
  12.  
  13. I am trying to perform a graphics operation similar to moving a brush
  14. in DPaint.  Here is what I am doing:
  15.  
  16. newx = Wnd->MouseX - 26;    // center image around pointer
  17. newy = Wnd->MouseY - 13;
  18. oldx = newx - x;            // delta x and y movements
  19. oldy = newy - y;
  20.  
  21. ClipBlit(undorp, 0, 0, rp, oldx, oldy, 52, 27, 0xc0);    // replace destroyed
  22. WaitBlit();                                           
  23. ClipBlit(rp, newx, newy, undorp, 0, 0, 52, 27, 00c0);    // copy new region
  24. WaitBlit();                                           
  25. ClipBlit(erp, 6, 12, rp, newx, newy, 52, 27, 0x60);    // draw 'brush'
  26. WaitBlit();
  27.  
  28. This does exactly what I want it to.  However, I get stray bits of image
  29. left on the screen, even though I copy the mouse position so it doesn't
  30. change between ClipBlit() calls and I use WaitBlit() between them.  As
  31. a matter of fact, adding WaitBlit() didn't seem to help at all.  What
  32. could be wrong, and is there a faster way of doing this?
  33. -- 
  34. Dan Griffin
  35. griffin@egr.msu.edu
  36. "If an application takes two years to be developed, it's running at
  37. 0 MIPS, no matter what hardware platform it's running on" - Jobs
  38.