summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: af8d240)
raw | patch | inline | side by side (parent: af8d240)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 2 Mar 2007 06:56:21 +0000 (06:56 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 2 Mar 2007 06:56:21 +0000 (06:56 +0000) |
src/display/canvas-arena.cpp | patch | blob | history |
index 00203024cebf1459dbbeff5709d7428230dc439a..95e3757d4e09a5dfac47bdcf3c25df347ad32d41 100644 (file)
#include <display/nr-arena.h>
#include <display/nr-arena-group.h>
#include <display/canvas-arena.h>
+#include <display/inkscape-cairo.h>
enum {
ARENA_EVENT,
#ifdef STRICT_RGBA
nr_pixblock_setup_fast (&pb, NR_PIXBLOCK_MODE_R8G8B8A8P, area.x0, area.y0, area.x1, area.y1, TRUE);
- /* fixme: */
- pb.empty = FALSE;
#endif
// CAIRO FIXME: switch this to R8G8B8A8P and 4 * ...
FALSE, FALSE);
#ifdef STRICT_RGBA
- pb.visible_area = buf->visible_rect;
+ pb.visible_area = buf->visible_rect;
+
if (pb.data.px != NULL) {
- nr_arena_item_invoke_render (NULL, arena->root, &area, &pb, 0);
- // this does the 32->24 squishing, using an assembler routine:
- nr_blit_pixblock_pixblock (&cb, &pb);
+ cairo_t *ct = nr_create_cairo_context (&area, &pb);
+
+ nr_arena_item_invoke_render (ct, arena->root, &area, &pb, 0);
+
+ if (pb.empty == FALSE) {
+
+
+ // this does the 32->24 squishing, using an assembler routine:
+ nr_blit_pixblock_pixblock (&cb, &pb);
+ }
+
+ cairo_surface_t *cst = cairo_get_target(ct);
+ cairo_destroy (ct);
+ cairo_surface_finish (cst);
+ cairo_surface_destroy (cst);
}
+
nr_pixblock_release (&pb);
#else
cb.visible_area = buf->visible_rect;