summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 273e421)
raw | patch | inline | side by side (parent: 273e421)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 11 Aug 2007 20:54:03 +0000 (20:54 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 11 Aug 2007 20:54:03 +0000 (20:54 +0000) |
src/display/nr-arena-item.cpp | patch | blob | history | |
src/helper/png-write.cpp | patch | blob | history |
index d98bbaf3ab580a68bc44a55778d799efeacdf1e3..5ebd94a9b62ae15cd0beb2d1e035a373c12695aa 100644 (file)
@@ -418,7 +418,12 @@ nr_arena_item_invoke_render (cairo_t *ct, NRArenaItem *item, NRRectL const *area
(item->parent && item->parent->background_pb)) {
item->background_pb = &ipb;
}
+
ipb.visible_area = pb->visible_area;
+ if (item->filter) {
+ item->filter->area_enlarge (ipb.visible_area, item->ctm);
+ }
+
unsigned int state = NR_ARENA_ITEM_VIRTUAL (item, render) (ct, item, &carea, &ipb, flags);
if (state & NR_ARENA_ITEM_STATE_INVALID) {
/* Clean up and return error */
index 19cf0ad5a17fdd6679ea78951c5cced45fbd7645..14c1ec32533cc1cee4da5ef6248276869c0a686d 100644 (file)
--- a/src/helper/png-write.cpp
+++ b/src/helper/png-write.cpp
// off, but that's less noticeable).
NRRectL bbox;
bbox.x0 = 0;
- bbox.y0 = 0;//row;
+ bbox.y0 = row;
bbox.x1 = ebp->width;
- bbox.y1 = ebp->height;//row + num_rows;
+ bbox.y1 = row + num_rows;
/* Update to renderable state */
NRGC gc(NULL);
nr_matrix_set_identity(&gc.transform);
NRPixBlock pb;
nr_pixblock_setup_extern(&pb, NR_PIXBLOCK_MODE_R8G8B8A8N,
- bbox.x0, row/*bbox.y0*/, bbox.x1, row + num_rows/*bbox.y1*/,
+ bbox.x0, bbox.y0, bbox.x1, bbox.y1,
ebp->px, 4 * ebp->width, FALSE, FALSE);
for (int r = 0; r < num_rows; r++) {
ebp.data = data;
bool write_status;
- if (width * height < 65536 / 4) {
+ if ((width < 256) || ((width * height) < 32768)) {
ebp.px = nr_pixelstore_64K_new(FALSE, 0);
- ebp.sheight = height;
+ ebp.sheight = 65536 / (4 * width);
write_status = sp_png_write_rgba_striped(filename, width, height, xdpi, ydpi, sp_export_get_rows, &ebp);
nr_pixelstore_64K_free(ebp.px);
} else {
- ebp.sheight = MAX(1,MIN(MAX_STRIPE_SIZE / (4 * width),height));
- ebp.px = g_new(guchar, 4 * width * ebp.sheight);
+ ebp.px = g_new(guchar, 4 * 64 * width);
+ ebp.sheight = 64;
write_status = sp_png_write_rgba_striped(filename, width, height, xdpi, ydpi, sp_export_get_rows, &ebp);
g_free(ebp.px);
}