1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#ifndef __NR_ARENA_IMAGE_H__
#define __NR_ARENA_IMAGE_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_IMAGE (nr_arena_image_get_type ())
#define NR_ARENA_IMAGE(o) (NR_CHECK_INSTANCE_CAST ((o), NR_TYPE_ARENA_IMAGE, NRArenaImage))
#define NR_IS_ARENA_IMAGE(o) (NR_CHECK_INSTANCE_TYPE ((o), NR_TYPE_ARENA_IMAGE))
#include <libnr/nr-matrix.h>
#include "nr-arena-item.h"
NRType nr_arena_image_get_type (void);
struct NRArenaImage : public NRArenaItem {
unsigned char *px;
unsigned int pxw;
unsigned int pxh;
unsigned int pxrs;
double x, y;
double width, height;
/* From GRID to PIXELS */
NR::Matrix grid2px;
static NRArenaImage *create(NRArena *arena) {
NRArenaImage *obj=reinterpret_cast<NRArenaImage *>(nr_object_new(NR_TYPE_ARENA_IMAGE));
obj->init(arena);
return obj;
}
};
struct NRArenaImageClass {
NRArenaItemClass parent_class;
};
void nr_arena_image_set_pixels (NRArenaImage *image, const unsigned char *px, unsigned int pxw, unsigned int pxh, unsigned int pxrs);
void nr_arena_image_set_geometry (NRArenaImage *image, double x, double y, double width, double height);
#endif
|