summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1d2eeef)
raw | patch | inline | side by side (parent: 1d2eeef)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 1 Mar 2007 06:19:16 +0000 (06:19 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 1 Mar 2007 06:19:16 +0000 (06:19 +0000) |
15 files changed:
index 3e01a749820fb16a23c08c1aa8ab8d625d682f77..5cd5df143fe19667f9d61ee3fc10bc19e7758207 100644 (file)
nr_pixblock_setup_extern( &pb, NR_PIXBLOCK_MODE_R8G8B8A8N,
ibox.x0, ibox.y0, ibox.x1, ibox.y1,
px, 4 * width, FALSE, FALSE );
- nr_arena_item_invoke_render( trace_root, &ibox, &pb,
+ nr_arena_item_invoke_render(NULL, trace_root, &ibox, &pb,
NR_ARENA_ITEM_RENDER_NO_CACHE );
double R = 0, G = 0, B = 0, A = 0;
index 863d86f7c37e026ca4d6ae94dedfe3fba1d674cd..00203024cebf1459dbbeff5709d7428230dc439a 100644 (file)
#ifdef STRICT_RGBA
pb.visible_area = buf->visible_rect;
if (pb.data.px != NULL) {
- nr_arena_item_invoke_render (arena->root, &area, &pb, 0);
+ 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);
}
nr_pixblock_release (&pb);
#else
- cb.visible_area = buf->visible_rect;
- nr_arena_item_invoke_render (arena->root, &area, &cb, 0);
+ cb.visible_area = buf->visible_rect;
+ nr_arena_item_invoke_render (NULL, arena->root, &area, &cb, 0);
#endif
nr_pixblock_release (&cb);
area.x1 = pb->area.x1;
area.y1 = pb->area.y1;
- nr_arena_item_invoke_render (ca->root, &area, pb, 0);
+ nr_arena_item_invoke_render (NULL, ca->root, &area, pb, 0);
}
index a29c44ee14bc6bbb33073faf121c65aacf9b3544..b061e9acda50860fff1bac82ff34b228249cda16 100644 (file)
static void nr_arena_glyphs_group_finalize(NRObject *object);
static guint nr_arena_glyphs_group_update(NRArenaItem *item, NRRectL *area, NRGC *gc, guint state, guint reset);
-static unsigned int nr_arena_glyphs_group_render(NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags);
+static unsigned int nr_arena_glyphs_group_render(cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags);
static unsigned int nr_arena_glyphs_group_clip(NRArenaItem *item, NRRectL *area, NRPixBlock *pb);
static NRArenaItem *nr_arena_glyphs_group_pick(NRArenaItem *item, NR::Point p, gdouble delta, unsigned int sticky);
@@ -430,7 +430,7 @@ nr_arena_glyphs_group_update(NRArenaItem *item, NRRectL *area, NRGC *gc, guint s
static unsigned int
-nr_arena_glyphs_group_render(NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags)
+nr_arena_glyphs_group_render(cairo_t *ctt, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags)
{
NRArenaItem *child;
index b1319822da3ae35dad08cead32bc9034cf58f399..9c790eb97d4d6b332795983e807b68896c5df75f 100644 (file)
static void nr_arena_group_set_child_position (NRArenaItem *item, NRArenaItem *child, NRArenaItem *ref);
static unsigned int nr_arena_group_update (NRArenaItem *item, NRRectL *area, NRGC *gc, unsigned int state, unsigned int reset);
-static unsigned int nr_arena_group_render (NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags);
+static unsigned int nr_arena_group_render (cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags);
static unsigned int nr_arena_group_clip (NRArenaItem *item, NRRectL *area, NRPixBlock *pb);
static NRArenaItem *nr_arena_group_pick (NRArenaItem *item, NR::Point p, double delta, unsigned int sticky);
}
static unsigned int
-nr_arena_group_render (NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags)
+nr_arena_group_render (cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags)
{
NRArenaGroup *group = NR_ARENA_GROUP (item);
@@ -243,7 +243,7 @@ nr_arena_group_render (NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigne
/* Just compose children into parent buffer */
for (NRArenaItem *child = group->children; child != NULL; child = child->next) {
- ret = nr_arena_item_invoke_render (child, area, pb, flags);
+ ret = nr_arena_item_invoke_render (ct, child, area, pb, flags);
if (ret & NR_ARENA_ITEM_STATE_INVALID) break;
}
index c4140481b6f35677e7e298d4e2bdeaadb8319d56..e187c331f43c00c386e8246871d51cfcaa335f0d 100644 (file)
static void nr_arena_image_finalize (NRObject *object);
static unsigned int nr_arena_image_update (NRArenaItem *item, NRRectL *area, NRGC *gc, unsigned int state, unsigned int reset);
-static unsigned int nr_arena_image_render (NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags);
+static unsigned int nr_arena_image_render (cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags);
static NRArenaItem *nr_arena_image_pick (NRArenaItem *item, NR::Point p, double delta, unsigned int sticky);
static NRArenaItemClass *parent_class;
#define b2i (image->grid2px)
static unsigned int
-nr_arena_image_render (NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags)
+nr_arena_image_render (cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags)
{
nr_arena_image_x_sample = prefs_get_int_attribute ("options.bitmapoversample", "value", 1);
nr_arena_image_y_sample = nr_arena_image_x_sample;
index 68e4d3c9ee5ef71ec8fdfdd681849fb4820d3302..f449acf4a741e2ac44cc9e07d22b6cc92c01a09e 100644 (file)
*/
unsigned int
-nr_arena_item_invoke_render (NRArenaItem *item, NRRectL const *area,
+nr_arena_item_invoke_render (cairo_t *ct, NRArenaItem *item, NRRectL const *area,
NRPixBlock *pb, unsigned int flags)
{
bool outline = (item->arena->rendermode == RENDERMODE_OUTLINE);
item->background_pb = &ipb;
}
ipb.visible_area = pb->visible_area;
- unsigned int state = NR_ARENA_ITEM_VIRTUAL (item, render) (item, &carea, &ipb, flags);
+ 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 */
nr_pixblock_release (&ipb);
if (tpb.data.px != NULL) { // if memory allocation was successful
tpb.visible_area = pb->visible_area;
- unsigned int state = NR_ARENA_ITEM_VIRTUAL (item->mask, render) (item->mask, &carea, &tpb, flags);
+ unsigned int state = NR_ARENA_ITEM_VIRTUAL (item->mask, render) (ct, item->mask, &carea, &tpb, flags);
if (state & NR_ARENA_ITEM_STATE_INVALID) {
/* Clean up and return error */
nr_pixblock_release (&tpb);
// Render clipped or masked object in outline mode:
// First, render the object itself
- unsigned int state = NR_ARENA_ITEM_VIRTUAL (item, render) (item, &carea, dpb, flags);
+ unsigned int state = NR_ARENA_ITEM_VIRTUAL (item, render) (ct, item, &carea, dpb, flags);
if (state & NR_ARENA_ITEM_STATE_INVALID) {
/* Clean up and return error */
if (dpb != pb)
// render clippath as an object, using a different color
if (item->clip) {
item->arena->outlinecolor = prefs_get_int_attribute("options.wireframecolors", "clips", 0x00ff00ff); // green clips
- NR_ARENA_ITEM_VIRTUAL (item->clip, render) (item->clip, &carea, dpb, flags);
+ NR_ARENA_ITEM_VIRTUAL (item->clip, render) (ct, item->clip, &carea, dpb, flags);
}
// render mask as an object, using a different color
if (item->mask) {
item->arena->outlinecolor = prefs_get_int_attribute("options.wireframecolors", "masks", 0x0000ffff); // blue masks
- NR_ARENA_ITEM_VIRTUAL (item->mask, render) (item->mask, &carea, dpb, flags);
+ NR_ARENA_ITEM_VIRTUAL (item->mask, render) (ct, item->mask, &carea, dpb, flags);
}
item->arena->outlinecolor = saved_rgba; // restore outline color
dpb->empty = FALSE;
} else {
/* Just render */
- unsigned int state = NR_ARENA_ITEM_VIRTUAL (item, render) (item, &carea, dpb, flags);
+ unsigned int state = NR_ARENA_ITEM_VIRTUAL (item, render) (ct, item, &carea, dpb, flags);
if (state & NR_ARENA_ITEM_STATE_INVALID) {
/* Clean up and return error */
if (dpb != pb)
index 16a7a0c129a9c1500e7f7d5b1a6957e587f54881..103315c5eadd2ca4f316cc6c1e53b4938259dfa2 100644 (file)
#include "gc-soft-ptr.h"
#include "nr-arena-forward.h"
#include "display/nr-filter.h"
+#include <cairo.h>
struct NRGC {
NRGC(NRGC const *p) : parent(p) {}
void (* set_child_position) (NRArenaItem *item, NRArenaItem *child, NRArenaItem *ref);
unsigned int (* update) (NRArenaItem *item, NRRectL *area, NRGC *gc, unsigned int state, unsigned int reset);
- unsigned int (* render) (NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags);
+ unsigned int (* render) (cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags);
unsigned int (* clip) (NRArenaItem *item, NRRectL *area, NRPixBlock *pb);
NRArenaItem * (* pick) (NRArenaItem *item, NR::Point p, double delta, unsigned int sticky);
};
@@ -151,7 +152,7 @@ void nr_arena_item_set_child_position (NRArenaItem *item, NRArenaItem *child, NR
unsigned int nr_arena_item_invoke_update (NRArenaItem *item, NRRectL *area, NRGC *gc, unsigned int state, unsigned int reset);
-unsigned int nr_arena_item_invoke_render(NRArenaItem *item, NRRectL const *area, NRPixBlock *pb, unsigned int flags);
+unsigned int nr_arena_item_invoke_render(cairo_t *ct, NRArenaItem *item, NRRectL const *area, NRPixBlock *pb, unsigned int flags);
unsigned int nr_arena_item_invoke_clip (NRArenaItem *item, NRRectL *area, NRPixBlock *pb);
NRArenaItem *nr_arena_item_invoke_pick (NRArenaItem *item, NR::Point p, double delta, unsigned int sticky);
index d6b3bc73b3262d87a3fdf2799230f926b8214ba9..7b8a2c281c83c155b2c66a4a369926f05998c846 100644 (file)
static void nr_arena_shape_set_child_position(NRArenaItem *item, NRArenaItem *child, NRArenaItem *ref);
static guint nr_arena_shape_update(NRArenaItem *item, NRRectL *area, NRGC *gc, guint state, guint reset);
-static unsigned int nr_arena_shape_render(NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags);
+static unsigned int nr_arena_shape_render(cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags);
static guint nr_arena_shape_clip(NRArenaItem *item, NRRectL *area, NRPixBlock *pb);
static NRArenaItem *nr_arena_shape_pick(NRArenaItem *item, NR::Point p, double delta, unsigned int sticky);
@@ -850,7 +850,7 @@ cairo_arena_shape_render_stroke(NRArenaItem *item, NRRectL *area, NRPixBlock *pb
* Renders the item. Markers are just composed into the parent buffer.
*/
static unsigned int
-nr_arena_shape_render(NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags)
+nr_arena_shape_render(cairo_t *ctt, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags)
{
NRArenaShape *shape = NR_ARENA_SHAPE(item);
@@ -980,7 +980,7 @@ nr_arena_shape_render(NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned
/* Just compose children into parent buffer */
for (NRArenaItem *child = shape->markers; child != NULL; child = child->next) {
unsigned int ret;
- ret = nr_arena_item_invoke_render(child, area, pb, flags);
+ ret = nr_arena_item_invoke_render(ctt, child, area, pb, flags);
if (ret & NR_ARENA_ITEM_STATE_INVALID) return ret;
}
index 5c455ffe41175d80e42ad14889488f5206b4e3f7..a4eac8b67e1e39fad4b7d53a5f3f78b00851d964 100644 (file)
bbox.x0, bbox.y0, bbox.x1, bbox.y1,
(guchar*)px, 4 * width, FALSE, FALSE);
memset(px, 0xff, 4 * width * 64);
- nr_arena_item_invoke_render(mod->root, &bbox, &pb, 0);
+ nr_arena_item_invoke_render(NULL, mod->root, &bbox, &pb, 0);
/* Blitter goes here */
NRMatrix imgt;
imgt.c[0] = (bbox.x1 - bbox.x0) / dots_per_pt;
index 51dbd3a00f09a8e66ff91cb943b4eb68dda40133..74635b2a609b4e25e71f3818f3bef7c615505cda 100644 (file)
memset (px, 0xff, 4 * num_rows * width);
/* Render */
- nr_arena_item_invoke_render (mod->root, &bbox, &pb, 0);
+ nr_arena_item_invoke_render (NULL, mod->root, &bbox, &pb, 0);
/* Swap red and blue channels; we use RGBA, whereas
* the Win32 GDI uses BGRx.
diff --git a/src/flood-context.cpp b/src/flood-context.cpp
index da8f22513c29f03f8b3c183924efcef9f3249017..02e398c453c45703b2e02f01e11e3c9fd9da8cb2 100644 (file)
--- a/src/flood-context.cpp
+++ b/src/flood-context.cpp
@@ -425,7 +425,7 @@ static void sp_flood_do_flood_fill(SPEventContext *event_context, GdkEvent *even
final_bbox.x0, final_bbox.y0, final_bbox.x1, final_bbox.y1,
px, 4 * width, FALSE, FALSE );
- nr_arena_item_invoke_render( root, &final_bbox, &B, NR_ARENA_ITEM_RENDER_NO_CACHE );
+ nr_arena_item_invoke_render(NULL, root, &final_bbox, &B, NR_ARENA_ITEM_RENDER_NO_CACHE );
nr_pixblock_release(&B);
// Hide items
index 6d9f58ee3dd351ad8076b89b9202d26da926819a..383e7c56323c2d1f93391be847129d58742deac2 100644 (file)
--- a/src/helper/png-write.cpp
+++ b/src/helper/png-write.cpp
}
/* Render */
- nr_arena_item_invoke_render(ebp->root, &bbox, &pb, 0);
+ nr_arena_item_invoke_render(NULL, ebp->root, &bbox, &pb, 0);
for (int r = 0; r < num_rows; r++) {
rows[r] = NR_PIXBLOCK_PX(&pb) + r * pb.rs;
diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp
index 3640a6768030b88a3e8e666c7a664239621ce5f1..c2fedff50fc901d6f14b9830b1010e3632c29664 100644 (file)
--- a/src/sp-pattern.cpp
+++ b/src/sp-pattern.cpp
@@ -784,7 +784,7 @@ sp_pattern_painter_new (SPPaintServer *ps, NR::Matrix const &full_transform, NR:
}
nr_arena_item_invoke_update (pp->root, NULL, &gc, NR_ARENA_ITEM_STATE_ALL, NR_ARENA_ITEM_STATE_ALL);
if ( pp->use_cached_tile ) {
- nr_arena_item_invoke_render (pp->root, &pp->cached_bbox, &pp->cached_tile, 0);
+ nr_arena_item_invoke_render (NULL, pp->root, &pp->cached_bbox, &pp->cached_tile, 0);
} else {
// nothing to do now
}
// fixme: (Lauris)
nr_pixblock_setup_extern (&ppb, pb->mode, area.x0, area.y0, area.x1, area.y1, NR_PIXBLOCK_PX (pb), pb->rs, FALSE, FALSE);
- nr_arena_item_invoke_render (pp->root, &area, &ppb, 0);
+ nr_arena_item_invoke_render (NULL, pp->root, &area, &ppb, 0);
nr_pixblock_release (&ppb);
}
index cee1db71504968a36c4bf6174ab0bbc9be26cb6d..82c56f2a46f2d18826f6f046c9233a65e59f9cfa 100644 (file)
px + 4 * psize * (ua.y0 - area.y0) +
4 * (ua.x0 - area.x0),
4 * psize, FALSE, FALSE );
- nr_arena_item_invoke_render( root, &ua, &B,
+ nr_arena_item_invoke_render(NULL, root, &ua, &B,
NR_ARENA_ITEM_RENDER_NO_CACHE );
nr_pixblock_release(&B);
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index adf876949c8c8daa1e82c70ac1b056a8aa84c80a..4506a3c6a0f1db2311c753cb7ac87bcd8c648c3c 100644 (file)
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
px + 4 * psize * (ua.y0 - area.y0) +
4 * (ua.x0 - area.x0),
4 * psize, FALSE, FALSE );
- nr_arena_item_invoke_render( root, &ua, &B,
+ nr_arena_item_invoke_render(NULL, root, &ua, &B,
NR_ARENA_ITEM_RENDER_NO_CACHE );
nr_pixblock_release(&B);