[cairo] roadster install problem
Carl Worth
cworth at cworth.org
Mon May 9 12:30:46 PDT 2005
On Mon, 9 May 2005 14:32:45 -0400, G Blair wrote:
> Any suggestions as to how the parameters for the cairo_create
> function call should be set up in the following code?
Sure.
> cairo_t* pCairo = cairo_create ();
> cairo_set_target_drawable(pCairo, dpy, drawable);
Basically, you'll want to replace those two calls with something along
the lines of:
cairo_surface_t* surface;
cairo_t* pCairo;
...
/* XXX: Extract Xlib Visual* from GdkPixmap here somehow */
surface = cairo_xlib_surface_create_for_pixmap_with_visual (dpy,
drawable,
visual);
pCairo = cairo_create (surface);
cairo_surface_destroy (surface);
I'm not sure how to get the Visual* from the GdkPixmap though. Maybe
Owen can chime in here. And I would suggest using "pixmap" rather than
"drawable" for the identifier.
That's the end of the answer, but since I've got API issues on the
brain:
I wonder if we've got the right names for the cairo_xlib_surface
create functions. So far, all my code uses the "with_visual" version,
(since I need to be Visual-compatible with something to do an
XCopyArea at some point). Should we drop "with_visual" and stick the
format-accepting version with the longer name? That is:
cairo_surface_t *
cairo_xlib_surface_create_for_pixmap_with_format (Display *dpy,
Pixmap pixmap,
cairo_format_t format);
cairo_surface_t *
cairo_xlib_surface_create_for_pixmap (Display *dpy,
Pixmap pixmap,
Visual *visual);
cairo_surface_t *
cairo_xlib_surface_create_for_window (Display *dpy,
Window window,
Visual *visual);
I think Owen also suggested (half-seriously ?) removing the
Window-accepting version. That would let us drop the "for_pixmap" from
the remaining two names which would reign in the length quite nicely.
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050509/ccee2a78/attachment.pgp
More information about the cairo
mailing list