[cairo] Drawing into a memory block
cworth at cworth.org
Thu Apr 14 04:48:59 PDT 2005
On Thu, 14 Apr 2005 07:27:42 -0400, John Ellson wrote:
> >The function I'm using to create the surface is:
> >cairo_image_surface_create_for_data(gfx_info->video_base, ....); where
> >video_base is pointer to LFB.
That's the right function to tell cairo to draw to a memory buffer
based at gfx_info->video_base. One significant issue is whether your
framebuffer supports an image format compatible with one of the
Are you not seeing any data being written to the buffer you pass in to
this function? You should be.
> Are you having the same problem that I had. That "_for_" in the API
> names really means "_from_" ?
> This function is (I suspect) for reading from memory data; not to set
> up for output to memory.
No, "for" here does mean "for". Kristian is fixing the case you ran
into by renaming "for_png" to "from_png". The "create_for_data"
function does direct output to the memory buffer passed in to it.
We could probably use better naming here. Looking back at the
sentences above it seems like something with "to" and "buffer" might
be an improvement over "from" and "data".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050414/7d962195/attachment.pgp
More information about the cairo