9fans archive / 2000 / 09 / 77 /    prev next

From: "rob pike" <rob@pla...>
Subject: Re: [9fans] pasting pre-defined bitmap image
Date: Thu, 7 Sep 2000 10:34:28 -0400

> 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