blob: df9fca912b4b360efb35823570c3906bb9b9e5ad (
plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
/*
* This file is part of Pencil
* Licensed under the MIT License,
* http://www.opensource.org/licenses/mit-license
* Copyright 2005 James Bursa <james@semichrome.net>
*/
#ifndef PENCIL_INTERNAL_H
#define PENCIL_INTERNAL_H
#include <stdbool.h>
#include "pencil.h"
struct pencil_item;
struct pencil_diagram {
struct pencil_item *root;
struct pencil_item *current_group;
};
typedef enum {
pencil_GROUP,
pencil_TEXT,
pencil_PATH,
pencil_SPRITE,
} pencil_item_type;
struct pencil_item {
pencil_item_type type;
pencil_colour fill_colour;
pencil_colour outline_colour;
char *group_name;
int x, y;
const char *font_family;
rufl_style font_style;
unsigned int font_size;
char *text;
int *path;
unsigned int path_size;
int thickness;
pencil_join join;
pencil_cap start_cap;
pencil_cap end_cap;
int cap_width;
int cap_length;
bool even_odd;
pencil_pattern pattern;
int width, height;
const char *sprite;
struct {
int x0;
int y0;
int x1;
int y1;
} bbox;
struct pencil_item *parent;
struct pencil_item *next;
struct pencil_item *children;
struct pencil_item *last;
};
#endif
|