[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
seedFill -- need example
- To: firstname.lastname@example.org
- Subject: seedFill -- need example
- From: email@example.com (Tom McDougal)
- Date: Wed, 20 Jan 1993 12:25:20 -0600
Several kind people pointed me to the traps seedFill and seedCFill for
flooding an area with paint (a-la the MacPaint paint bucket).
Unfortunately, my attempts to use seedFill have all crashed MCL. If it
wouldn't be too much trouble, could someone help me with an example?
To give you insight into my misunderstanding, here is what I tried most
(defun my-seed-fill (b/w-window h &optional v)
"Flood the region at h,v with paint."
(let ((h (if v h (point-h h)))
(v (if v v (point-v h))))
(let ((wptr (wptr b/w-window)))
(let ((srcPtr (pref wptr windowrecord.portbits))
(dstPtr (pref wptr windowrecord.portbits))
(srcrow (pref (pref wptr windowrecord.portrect)
(dstrow (pref (pref wptr windowrecord.portrect)
(words (pref (pref wptr windowrecord.portrect)
(height (pref (pref wptr windowrecord.portrect)
(#_seedFill srcptr dstptr srcrow dstrow height words h v))))))
;;;This goes "boom":
(setq *w* (make-instance 'window))
(frame-rect *w* 20 20 100 100)
(my-seed-fill *w* 50 50) ; flood the rectangle w/ paint
An example using seedCFill would be useful, too, if anyone has
Thank you for your kind attention.