X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdisplay%2Fnr-arena-item.h;h=c62c9a6ca5403d8b27f411f026e17c5558ece442;hb=e5183c603c61d36c2c145e99693cbc62463122f3;hp=801657cf3403e946a41441ea2d1d07f891cf5b07;hpb=bc44e67acb1457725817238120bcef0d1f1ada04;p=inkscape.git diff --git a/src/display/nr-arena-item.h b/src/display/nr-arena-item.h index 801657cf3..c62c9a6ca 100644 --- a/src/display/nr-arena-item.h +++ b/src/display/nr-arena-item.h @@ -62,73 +62,73 @@ #include struct NRGC { - NRGC(NRGC const *p) : parent(p) {} - NRGC const *parent; - NRMatrix transform; + NRGC(NRGC const *p) : parent(p) {} + NRGC const *parent; + NR::Matrix transform; }; struct NRArenaItem : public NRObject { - NRArena *arena; - Inkscape::GC::soft_ptr parent; - NRArenaItem *next; - Inkscape::GC::soft_ptr prev; - - /* 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 */ - NRRectL bbox; - /* BBox in item coordinates - this should be a bounding box as - * specified in SVG standard. Required by filters. */ - NR::Maybe item_bbox; - /* Our affine */ - NRMatrix *transform; - /* Clip item */ - NRArenaItem *clip; - /* Mask item */ - NRArenaItem *mask; - /* Filter to be applied after rendering this object, NULL if none */ - NR::Filter *filter; - /* Rendered buffer */ - unsigned char *px; - - /* Single data member */ - void *data; - - /* Current Transformation Matrix */ - NR::Matrix ctm; - - /* These hold background buffer state for filter rendering */ - NRPixBlock *background_pb; - bool background_new; - - void init(NRArena *arena) { - this->arena = arena; - } + NRArena *arena; + Inkscape::GC::soft_ptr parent; + NRArenaItem *next; + Inkscape::GC::soft_ptr prev; + + /* 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 */ + NRRectL bbox; + /* BBox in item coordinates - this should be a bounding box as + * specified in SVG standard. Required by filters. */ + NR::Maybe item_bbox; + /* Our affine */ + NR::Matrix *transform; + /* Clip item */ + NRArenaItem *clip; + /* Mask item */ + NRArenaItem *mask; + /* Filter to be applied after rendering this object, NULL if none */ + NR::Filter *filter; + /* Rendered buffer */ + unsigned char *px; + + /* Single data member */ + void *data; + + /* Current Transformation Matrix */ + NR::Matrix ctm; + + /* These hold background buffer state for filter rendering */ + NRPixBlock *background_pb; + bool background_new; + + void init(NRArena *arena) { + this->arena = arena; + } }; struct NRArenaItemClass : public NRObjectClass { - NRArenaItem * (* children) (NRArenaItem *item); - NRArenaItem * (* last_child) (NRArenaItem *item); - void (* add_child) (NRArenaItem *item, NRArenaItem *child, NRArenaItem *ref); - void (* remove_child) (NRArenaItem *item, NRArenaItem *child); - 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) (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); + NRArenaItem * (* children) (NRArenaItem *item); + NRArenaItem * (* last_child) (NRArenaItem *item); + void (* add_child) (NRArenaItem *item, NRArenaItem *child, NRArenaItem *ref); + void (* remove_child) (NRArenaItem *item, NRArenaItem *child); + 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) (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); }; #define NR_ARENA_ITEM_ARENA(ai) (((NRArenaItem *) (ai))->arena) @@ -170,7 +170,7 @@ NRArenaItem *nr_arena_item_unparent (NRArenaItem *item); void nr_arena_item_append_child (NRArenaItem *parent, NRArenaItem *child); void nr_arena_item_set_transform(NRArenaItem *item, NR::Matrix const &transform); -void nr_arena_item_set_transform(NRArenaItem *item, NRMatrix const *transform); +void nr_arena_item_set_transform(NRArenaItem *item, NR::Matrix const *transform); void nr_arena_item_set_opacity (NRArenaItem *item, double opacity); void nr_arena_item_set_sensitive (NRArenaItem *item, unsigned int sensitive); void nr_arena_item_set_visible (NRArenaItem *item, unsigned int visible); @@ -192,4 +192,16 @@ NRArenaItem *nr_arena_item_detach (NRArenaItem *parent, NRArenaItem *child); #define NR_ARENA_ITEM_SET_KEY(i,k) (((NRArenaItem *) (i))->key = (k)) #define NR_ARENA_ITEM_GET_KEY(i) (((NRArenaItem *) (i))->key) -#endif + +#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 :