[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to get GWorld's pixel address
- To: info-mcl@digitool.com
- Subject: How to get GWorld's pixel address
- From: minagawa@st.rim.or.jp (Minagawa,Kazushi)
- Date: Wed, 3 May 1995 16:05:55 +0900
- Sender: owner-info-mcl@digitool.com
I'm having a problem with getting GWorld's pixel address using the
GetPixBaseAddr trap. I must be doing something wrong.
Here's the code.
(defun access-to-gworld ()
(rlet ((gw-p :ointer)
(gw-r :rect
:topleft #@(0 0)
:bottomright #@(100 100)))
(#_NewGWorld gw-p 32 gw-r (%null-ptr) (%null-ptr) 0)
(with-macptrs ((pix-addr (#_GetPixBaseAddr (#_GetGWorldPxMap gw-p))))
(print (%get-byte pix-addr)))))
With macsbug I show that the error is "bus error". This means the address I
got using the GetPixBaseAddress trap is invalid.
Does anybody have any ideas about what is wrong here?
Thanks,
Minagawa,Kazushi
Nikon Systems, Inc.
Yokohama-city, Japan.