On Thu, Feb 04, 2016 at 12:33:37PM +0200, Marius Gedminas wrote: > On Thu, Feb 04, 2016 at 12:06:57PM +0200, Marius Gedminas wrote: > > The 'clearing ... 149 cells' messages in the log prove that this bit of code > > > > set_cairo_source_rgb_from_pixel(cr, gui.bgcolor->pixel); > > cairo_rectangle(cr, > > FILL_X(col), FILL_Y(row), > > num_cells * gui.char_width, gui.char_height); > > cairo_fill(cr); > > > > was executed, so it remains to be discovered why it didn't clear > > anything. Was there an active clipping rectangle? Was bgcolor->pixel > > wrong? I'll try to add more debugging printfs(). <...> > Everything seems correct, so I've no idea why cairo isn't clearing that > area :(
I turned to IRC for help (#gnome-hackers on irc.gnome.org), and this is
the advice I received:
<ebassi> mgedmin: Stop using gdk_cairo_create() and instead use the
cairo_t that GtkWidget::draw gives you
<ebassi> mgedmin: If you want to draw outside of the drawing code,
then create a surface using
gdk_window_create_similar_surface() or
gdk_window_create_similar_image_surface(), and draw on it;
then, inside the ::draw vfunc, use the surface as the source
on the cairo_t provided you by GtkWidget
Regards,
Marius Gedminas
--
Being really good at C++ is like being really good at using rocks to sharpen
sticks.
-- Thant Tessman
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: Digital signature
