Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!rutgers!apple!amdahl!kevin From: kevin@uts.amdahl.com (Kevin Clague) Newsgroups: comp.sys.amiga.tech Subject: Re: Trouble with Images Message-ID: <31us02M628Qf01@amdahl.uts.amdahl.com> Date: 18 May 89 02:01:06 GMT References: <1410018@hpcvca.CV.HP.COM> Reply-To: kevin@amdahl.uts.amdahl.com (Kevin Clague) Organization: Amdahl Corporation, Sunnyvale, CA 94086 Lines: 53 In article <1410018@hpcvca.CV.HP.COM> stan@hpcvca.CV.HP.COM (Stan Gibbs) writes: >I have been working my way through all of the Intuition functions, >writing simple programs to test my understanding. > >I have been having real trouble with the Image structure and >DrawImage() to create an image in a window. > >For all my effort, I can't seem to generate an image that corresponds >to what I want. I have included the errant code below, and would >appreciate any help. >I'm not using any special compiler (LC5.0) or linker options. > >What am I missing? > >Pointers to example sources would be very useful. Pointers is the problem... hee, heee You need to move your image data (not the structure) into chip RAM. You can either allocate chip RAM and copy imagepts into it, or use the LC5.02 chip keyword. > >Thanks. > >============================================================================ >| Stan Gibbs | >| stan@cv.hp.com || {hplabs,tektronix}!hp-pcd!stan | >============================================================================ > >#include >#include > >struct Window *NoBorder; >struct RastPort *r; > >USHORT imagepts[] = {0xffff,0x7ffe,0x3ffc,0x1ff8, make this USHORT chip imagepts[] = {0xffff, 0x7ffe, 0x3ffc, 0x1ff8, and everything should work better. Kevin -- UUCP: kevin@uts.amdahl.com or: {sun,decwrl,hplabs,pyramid,seismo,oliveb}!amdahl!kevin DDD: 408-737-5481 USPS: Amdahl Corp. M/S 249, 1250 E. Arques Av, Sunnyvale, CA 94086 [ Any thoughts or opinions which may or may not have been expressed ] [ herein are my own. They are not necessarily those of my employer. ]