diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-03-02 06:56:21 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-03-02 06:56:21 +0000 |
| commit | 8383fb27a07aea170e5b602eadff83cec33356e3 (patch) | |
| tree | ec53b59dc930c1359c6babbb1a0f98daef0d10fc /src | |
| parent | outline mode: render into the passed cairo_t (diff) | |
| download | inkscape-8383fb27a07aea170e5b602eadff83cec33356e3.tar.gz inkscape-8383fb27a07aea170e5b602eadff83cec33356e3.zip | |
create/destroy the cairo_t for all items to render into (currently used only in outline mode)
(bzr r2497)
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/canvas-arena.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/display/canvas-arena.cpp b/src/display/canvas-arena.cpp index 00203024c..95e3757d4 100644 --- a/src/display/canvas-arena.cpp +++ b/src/display/canvas-arena.cpp @@ -21,6 +21,7 @@ #include <display/nr-arena.h> #include <display/nr-arena-group.h> #include <display/canvas-arena.h> +#include <display/inkscape-cairo.h> enum { ARENA_EVENT, @@ -274,8 +275,6 @@ streamline rendering. #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 * ... @@ -285,12 +284,26 @@ streamline rendering. 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; |
