home *** CD-ROM | disk | FTP | other *** search
- 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
- From: griffin@eecae.msu.edu (Dan Griffin)
- Newsgroups: comp.sys.amiga.programmer
- Subject: ClipBlit() and brushes
- Message-ID: <1992Sep2.062319.5418@msuinfo.cl.msu.edu>
- Date: 2 Sep 92 06:23:19 GMT
- Sender: news@msuinfo.cl.msu.edu
- Organization: Michigan State University, College of Engineering, East Lansing
- Lines: 26
- Originator: griffin@eecae.ee.msu.edu
-
-
- I am trying to perform a graphics operation similar to moving a brush
- in DPaint. Here is what I am doing:
-
- newx = Wnd->MouseX - 26; // center image around pointer
- newy = Wnd->MouseY - 13;
- oldx = newx - x; // delta x and y movements
- oldy = newy - y;
-
- ClipBlit(undorp, 0, 0, rp, oldx, oldy, 52, 27, 0xc0); // replace destroyed
- WaitBlit();
- ClipBlit(rp, newx, newy, undorp, 0, 0, 52, 27, 00c0); // copy new region
- WaitBlit();
- ClipBlit(erp, 6, 12, rp, newx, newy, 52, 27, 0x60); // draw 'brush'
- WaitBlit();
-
- This does exactly what I want it to. However, I get stray bits of image
- left on the screen, even though I copy the mouse position so it doesn't
- change between ClipBlit() calls and I use WaitBlit() between them. As
- a matter of fact, adding WaitBlit() didn't seem to help at all. What
- could be wrong, and is there a faster way of doing this?
- --
- Dan Griffin
- griffin@egr.msu.edu
- "If an application takes two years to be developed, it's running at
- 0 MIPS, no matter what hardware platform it's running on" - Jobs
-