Commit b8aa82b4 authored by Moritz Lipp's avatar Moritz Lipp
Browse files

Render (does not work yet)

parent ca35db2d
......@@ -19,9 +19,21 @@ cb_destroy(GtkWidget* widget, gpointer data)
gboolean
cb_draw(GtkWidget* widget, GdkEventExpose* expose, gpointer data)
{
if(!widget) {
return false;
}
gdk_window_clear(widget->window);
cairo_t *cairo = gdk_cairo_create(widget->window);
if(!cairo) {
return false;
}
// FIXME: Split up
zathura_page_t* page = zathura_page_get(Zathura.document, Zathura.document->current_page_number);
if(!page) {
cairo_destroy(cairo);
goto error_out;
}
......@@ -32,6 +44,10 @@ cb_draw(GtkWidget* widget, GdkEventExpose* expose, gpointer data)
goto error_out;
}
cairo_set_source_surface(cairo, surface, 0, 0);
cairo_paint(cairo);
cairo_destroy(cairo);
cairo_surface_destroy(surface);
zathura_page_free(page);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment