[cairo] Another glitz - another problem
c99drn at cs.umu.se
Wed Dec 1 02:37:35 PST 2004
On Wed, 2004-12-01 at 02:23 -0800, Alex Dubov wrote:
> Thank you.
> I thought that glitz_surface_create call makes the
> whole job (as it gets drawable as argument). I could
> not guess that glitz_surface_attach is needed too.
> On this occasion, can you recommend the correct
> procedure for resizing of surfaces and/or drawables?
> Their constructors accept width and height parameters,
> but what if I want to resize an existing surface?
You can easily update the size of a drawable with
glitz_drawable_update_size. If you like to change with size of a surface
as well (and you probably like to do that), you'll have to destroy the
old surface and create a new one with the appropriate size and attach it
to the correct position of the drawable.
> --- David Reveman <c99drn at cs.umu.se> wrote:
> > On Tue, 2004-11-30 at 08:49 -0800, Alex Dubov wrote:
> > > Hello.
> > > I've recently upgraded glitz and cairo (from a
> > CVS).
> > > I made necessary (to my understanding) changes to
> > my
> > > program. The problem is that I'm always getting a
> > > black window, no matter if I'm using cairo or
> > > glitz_set_rectangle. glitz_drawable_swap_buffers
> > has
> > > certain effect (it cleans up the window), so
> > something
> > > is probably working (I'm getting no X errors;
> > gltrace
> > > shows nice succession of gl calls).
> > > May be somebody has a clue why I'm unable to draw
> > > anything visible?
> > Drawables and surfaces have been separated into
> > different objects. First
> > you'll have to create a drawable then you'll have to
> > create a surface
> > and the surface must then be attached to a portion
> > of the drawable to
> > make rendering operations on the surface target the
> > drawable.
> > When attaching the surface to the drawable, make
> > sure you're attaching
> > it to the correct buffer. You probably want to
> > attach it to the back
> > buffer if the drawable is double buffered.
> > -David
> Do you Yahoo!?
> Meet the all-new My Yahoo! - Try it today!
> cairo mailing list
> cairo at cairographics.org
More information about the cairo