nr-arena-item.h revision 208e5a33acc4a8ad9d8c0488f047c260346f1258
#ifndef __NR_ARENA_ITEM_H__
#define __NR_ARENA_ITEM_H__
/*
* RGBA display list system for inkscape
*
* Author:
* Lauris Kaplinski <lauris@kaplinski.com>
*
* Copyright (C) 2001-2002 Lauris Kaplinski
* Copyright (C) 2001 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#define NR_TYPE_ARENA_ITEM (nr_arena_item_get_type ())
/*
* NRArenaItem state flags
*/
/*
* NR_ARENA_ITEM_STATE_INVALID
*
* If set or retuned indicates, that given object is in error.
* Calling method has to return immediately, with appropriate
* error flag.
*/
#define NR_ARENA_ITEM_STATE_INVALID (1 << 0)
#define NR_ARENA_ITEM_STATE_NONE 0x0000
#define NR_ARENA_ITEM_STATE_ALL 0x01fe
#define NR_ARENA_ITEM_RENDER_NO_CACHE (1 << 0)
#include <libnr/nr-matrix.h>
#include <libnr/nr-rect-l.h>
#include <libnr/nr-pixblock.h>
#include <libnr/nr-object.h>
#include "gc-soft-ptr.h"
#include "nr-arena-forward.h"
#include "display/nr-filter.h"
#include <cairo.h>
struct NRGC {
};
/* Item state */
unsigned int state : 16;
unsigned int propagate : 1;
unsigned int sensitive : 1;
unsigned int visible : 1;
/* Whether items renders opacity itself */
unsigned int render_opacity : 1;
/* Opacity itself */
unsigned int opacity : 8;
/* Key for secondary rendering */
unsigned int key;
/* BBox in grid coordinates */
/* BBox in item coordinates - this should be a bounding box as
* specified in SVG standard. Required by filters. */
/* Our affine */
/* Clip item */
/* Mask item */
/* Filter to be applied after rendering this object, NULL if none */
/* Rendered buffer */
unsigned char *px;
/* Single data member */
void *data;
/* Current Transformation Matrix */
/* These hold background buffer state for filter rendering */
bool background_new;
}
};
unsigned int (* update) (NRArenaItem *item, NRRectL *area, NRGC *gc, unsigned int state, unsigned int reset);
unsigned int (* render) (cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags);
};
NRType nr_arena_item_get_type (void);
/*
* Invoke update to given state, if item is inside area
*
* area == NULL is infinite
* gc is PARENT gc for invoke, CHILD gc in corresponding virtual method
* state - requested to state (bitwise or of requested flags)
* reset - reset to state (bitwise or of flags to reset)
*/
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(cairo_t *ct, NRArenaItem *item, NRRectL const *area, NRPixBlock *pb, unsigned int flags);
NRArenaItem *nr_arena_item_invoke_pick (NRArenaItem *item, NR::Point p, double delta, unsigned int sticky);
/* Public */
/* Helpers */
NRArenaItem *nr_arena_item_attach (NRArenaItem *parent, NRArenaItem *child, NRArenaItem *prev, NRArenaItem *next);
#endif /* !__NR_ARENA_ITEM_H__ */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :