summaryrefslogtreecommitdiff
path: root/fitz/dev_null.c
blob: 508be7e0d152cc8e31d752aa343f806071fa2af0 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#include "fitz.h"

fz_device *
fz_new_device(void *user)
{
	fz_device *dev = fz_malloc(sizeof(fz_device));
	memset(dev, 0, sizeof(fz_device));
	dev->hints = 0;
	dev->flags = 0;
	dev->user = user;
	return dev;
}

void
fz_free_device(fz_device *dev)
{
	if (dev->free_user)
		dev->free_user(dev->user);
	fz_free(dev);
}

void
fz_fill_path(fz_device *dev, fz_path *path, int even_odd, fz_matrix ctm,
	fz_colorspace *colorspace, float *color, float alpha)
{
	if (dev->fill_path)
		dev->fill_path(dev->user, path, even_odd, ctm, colorspace, color, alpha);
}

void
fz_stroke_path(fz_device *dev, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm,
	fz_colorspace *colorspace, float *color, float alpha)
{
	if (dev->stroke_path)
		dev->stroke_path(dev->user, path, stroke, ctm, colorspace, color, alpha);
}

void
fz_clip_path(fz_device *dev, fz_path *path, fz_rect *rect, int even_odd, fz_matrix ctm)
{
	if (dev->clip_path)
		dev->clip_path(dev->user, path, rect, even_odd, ctm);
}

void
fz_clip_stroke_path(fz_device *dev, fz_path *path, fz_rect *rect, fz_stroke_state *stroke, fz_matrix ctm)
{
	if (dev->clip_stroke_path)
		dev->clip_stroke_path(dev->user, path, rect, stroke, ctm);
}

void
fz_fill_text(fz_device *dev, fz_text *text, fz_matrix ctm,
	fz_colorspace *colorspace, float *color, float alpha)
{
	if (dev->fill_text)
		dev->fill_text(dev->user, text, ctm, colorspace, color, alpha);
}

void
fz_stroke_text(fz_device *dev, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm,
	fz_colorspace *colorspace, float *color, float alpha)
{
	if (dev->stroke_text)
		dev->stroke_text(dev->user, text, stroke, ctm, colorspace, color, alpha);
}

void
fz_clip_text(fz_device *dev, fz_text *text, fz_matrix ctm, int accumulate)
{
	if (dev->clip_text)
		dev->clip_text(dev->user, text, ctm, accumulate);
}

void
fz_clip_stroke_text(fz_device *dev, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm)
{
	if (dev->clip_stroke_text)
		dev->clip_stroke_text(dev->user, text, stroke, ctm);
}

void
fz_ignore_text(fz_device *dev, fz_text *text, fz_matrix ctm)
{
	if (dev->ignore_text)
		dev->ignore_text(dev->user, text, ctm);
}

void
fz_pop_clip(fz_device *dev)
{
	if (dev->pop_clip)
		dev->pop_clip(dev->user);
}

void
fz_fill_shade(fz_device *dev, fz_shade *shade, fz_matrix ctm, float alpha)
{
	if (dev->fill_shade)
		dev->fill_shade(dev->user, shade, ctm, alpha);
}

void
fz_fill_image(fz_device *dev, fz_pixmap *image, fz_matrix ctm, float alpha)
{
	if (dev->fill_image)
		dev->fill_image(dev->user, image, ctm, alpha);
}

void
fz_fill_image_mask(fz_device *dev, fz_pixmap *image, fz_matrix ctm,
	fz_colorspace *colorspace, float *color, float alpha)
{
	if (dev->fill_image_mask)
		dev->fill_image_mask(dev->user, image, ctm, colorspace, color, alpha);
}

void
fz_clip_image_mask(fz_device *dev, fz_pixmap *image, fz_rect *rect, fz_matrix ctm)
{
	if (dev->clip_image_mask)
		dev->clip_image_mask(dev->user, image, rect, ctm);
}

void
fz_begin_mask(fz_device *dev, fz_rect area, int luminosity, fz_colorspace *colorspace, float *bc)
{
	if (dev->begin_mask)
		dev->begin_mask(dev->user, area, luminosity, colorspace, bc);
}

void
fz_end_mask(fz_device *dev)
{
	if (dev->end_mask)
		dev->end_mask(dev->user);
}

void
fz_begin_group(fz_device *dev, fz_rect area, int isolated, int knockout, int blendmode, float alpha)
{
	if (dev->begin_group)
		dev->begin_group(dev->user, area, isolated, knockout, blendmode, alpha);
}

void
fz_end_group(fz_device *dev)
{
	if (dev->end_group)
		dev->end_group(dev->user);
}

void
fz_begin_tile(fz_device *dev, fz_rect area, fz_rect view, float xstep, float ystep, fz_matrix ctm)
{
	if (dev->begin_tile)
		dev->begin_tile(dev->user, area, view, xstep, ystep, ctm);
}

void
fz_end_tile(fz_device *dev)
{
	if (dev->end_tile)
		dev->end_tile(dev->user);
}