home *** CD-ROM | disk | FTP | other *** search
- /* -------------------------------------------------------------------- */
- /* Blob Transaction Routines - with zooming */
- /* -------------------------------------------------------------------- */
-
-
- # include "BlobMgr.h"
-
-
- /*
- * Same as UnglueGlob(), except that a rectangle is zoomed
- * from the destination blob back to the source blob.
- */
-
- pascal void
- ZUnglueGlob (BlobHandle b)
- {
- BlobHandle g;
- Rect r1, r2;
-
- g = (**b).glob;
- if (g != nil) /* skip if don't really have glued blob */
- {
- (**b).glob = nil;
- DrawBlob (b, inDragBlob);
- r1 = BDragBox (b);
- r2 = BDragBox (g);
- BMgrZoomRect (&r1, &r2);
- DecBlobGlue (g); /* dec use count and undim if necessary */
- }
- }
-
-
- pascal void
- ZUnglueGlobSet (BlobSetHandle bSet)
- {
- BlobLoopProc1 (&ZUnglueGlob, bSet);
- }
-
-
- /*
- * Same as GlueGlob(), but zooms the donor to the receptor first
- */
-
- pascal void
- ZGlueGlob (BlobHandle d, BlobHandle r)
- {
- Rect r1, r2;
-
- r1 = BDragBox (d);
- r2 = BDragBox (r);
- BMgrZoomRect (&r1, &r2);
- GlueGlob (d, r);
- }
-
-
- /*
- * Same as DupGlob(), but zooms from the first receptor to the second
- * before duplicating.
- *
- * This really should use the drag region of the first receptor's glob,
- * mapped to the shape and position of the receptor, rather than the
- * receptor's drag region - since it's the glob that's being transferred.
- * But that requires mapping (and scaling when it's put in).
- */
-
- pascal void
- ZDupGlob (BlobHandle r1, BlobHandle r2)
- {
- Rect rect1, rect2;
-
- if (BGlob (r1) != nil)
- {
- rect1 = BDragBox (r1);
- rect2 = BDragBox (r2);
- BMgrZoomRect (&rect1, &rect2);
- DupGlob (r1, r2);
- }
- }
-
-