Code

Fixed a few warnings and hardcoded PANGO_GLYPH_* constants
[inkscape.git] / src / display / nr-arena-image.h
1 #ifndef __NR_ARENA_IMAGE_H__
2 #define __NR_ARENA_IMAGE_H__
4 /*
5  * RGBA display list system for inkscape
6  *
7  * Author:
8  *   Lauris Kaplinski <lauris@kaplinski.com>
9  *
10  * Copyright (C) 2001-2002 Lauris Kaplinski
11  * Copyright (C) 2001 Ximian, Inc.
12  *
13  * Released under GNU GPL, read the file 'COPYING' for more information
14  */
16 #define NR_TYPE_ARENA_IMAGE (nr_arena_image_get_type ())
17 #define NR_ARENA_IMAGE(o) (NR_CHECK_INSTANCE_CAST ((o), NR_TYPE_ARENA_IMAGE, NRArenaImage))
18 #define NR_IS_ARENA_IMAGE(o) (NR_CHECK_INSTANCE_TYPE ((o), NR_TYPE_ARENA_IMAGE))
20 #include <libnr/nr-matrix.h>
21 #include "nr-arena-item.h"
23 NRType nr_arena_image_get_type (void);
25 struct NRArenaImage : public NRArenaItem {
26         unsigned char *px;
27         unsigned int pxw;
28         unsigned int pxh;
29         unsigned int pxrs;
31         double x, y;
32         double width, height;
34         /* From GRID to PIXELS */
35         NR::Matrix grid2px;
37         static NRArenaImage *create(NRArena *arena) {
38                 NRArenaImage *obj=reinterpret_cast<NRArenaImage *>(nr_object_new(NR_TYPE_ARENA_IMAGE));
39                 obj->init(arena);
40                 return obj;
41         }
42 };
44 struct NRArenaImageClass {
45         NRArenaItemClass parent_class;
46 };
48 void nr_arena_image_set_pixels (NRArenaImage *image, const unsigned char *px, unsigned int pxw, unsigned int pxh, unsigned int pxrs);
49 void nr_arena_image_set_geometry (NRArenaImage *image, double x, double y, double width, double height);
51 #endif