[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Graphics troubles.
- To: info-macl@cambridge.apple.com
- Subject: Graphics troubles.
- From: nakamura@SOE.Berkeley.Edu (Mark Nakamura)
- Date: Wed, 26 Sep 90 15:22:13 PDT
I'm having problems with graphics in MACL.
(1) Why isn't ORIGIN defined for a view?
(2) Why doesn't SET-ORIGIN work?
I figured that I could use VIEW-SCROLL-POSITION and SET-VIEW-SCROLL-POSITION
in place of these two methods.
(3) I'm trying to back up the contents of a window in a bitmap. So I use
COPY-BITS to do the job (which, btw isn't in the index). This seems
to work fine:
where <bitmap> is a pointer to a correctly (I think) defined bitmap,
and myw is a correctly defined window:
;; STEP 1
;; copy window contents to bitmap
(ask myw
(copy-bits (rref wptr grafport.portbits)
<bitmap>
(rref wptr grafport.portrect)
(rref wptr grafport.portrect)
:patcopy))
;; STEP 2
;; copy bitmap contents back to window
(ask myw
(copy-bits <bitmap>
(rref wptr grafport.portbits)
(rref wptr grafport.portrect)
(rref wptr grafport.portrect)
:patcopy))
;; All of this works fine. So I reset the origin (aka, view-scroll-position)
;; and try the same thing.
(set-view-scroll-position -200 -200)
repeat STEP 1
repeat STEP 2
;; Now I get a window full of dirty memory. What's am I doing wrong?
(4) CLIP-RECT seems to be losing very badly. I think that I saw a
patch posted earlier, but I recall that this patch had a storage/memory
leak. Is this so? Does anyone have patches that handle CLIP-RECT
correctly?
Thanks,
Mark