From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] pasting pre-defined bitmap image From: "rob pike" Date: Thu, 7 Sep 2000 10:34:28 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Message-Id: <20000907143432.75C25199D0@mail> Topicbox-Message-UUID: 0540800e-eac9-11e9-9e20-41e7f4b1d025 > In the 8½, we've used to make a rectangle by balloc(), and > then fill the rectange by a pre-defined patterns, and then > write it on to a window using this pre-defined rectangle > (ie., tiling pattern etc.). > > allocimage() of the new release allocates the image onto > the display. In the present case, this is not proper, instead, > we want just allocate the pattern in memory, and to use it > as the cursor shape (not at the cursor position). > > How I can do it on the new release graphic system? Bitmaps/Images are maintained essentially the same way in the two releases: stored as data on the same machine as the display. I don't understand why you think balloc() and allocimage() behave differently with respect to storage. The libraries are very different, however, so you may think it's behaving differently. It sounds like what you're asking for is the routine loadimage(), described in allocimage(2). Let me know if that doesn't solve your problem. -rob