LibGd 2.4.0-dev
GD Graphics library
Loading...
Searching...
No Matches
gd_span_rle.h
1#ifndef GD_SPAN_RLE_H
2#define GD_SPAN_RLE_H
3
4#include "gd_vector2d_private.h"
5
6#define _rle_spans_init(rle_s) \
7 do { \
8 rle_s.data = NULL; \
9 rle_s.size = 0; \
10 rle_s.capacity = 0; \
11 } while (0)
12
13#define _rle_spans_allocate(rle_s, count) \
14 do { \
15 if (rle_s.size + count > rle_s.capacity) { \
16 int capacity = rle_s.size + count; \
17 int newcapacity = rle_s.capacity == 0 ? 8 : rle_s.capacity; \
18 while (newcapacity < capacity) { \
19 newcapacity *= 2; \
20 } \
21 rle_s.data = gdRealloc(rle_s.data, (size_t)newcapacity * sizeof(rle_s.data[0])); \
22 rle_s.capacity = newcapacity; \
23 } \
24 } while (0)
25
26gdSpanRlePtr gdSpanRleCreate();
27gdSpanRlePtr gdSpanRleRetain(gdSpanRlePtr rle);
28void gdSpanRleDestroy(gdSpanRlePtr rle);
29void gdSpanRleClear(gdSpanRlePtr rle);
30void gdSpanRleRasterize(gdSpanRlePtr rle, const gdPathPtr path, const gdPathMatrixPtr matrix,
31 const gdRectFPtr clip, const gdStrokePtr stroke, gdFillRule winding);
32void gdSpanRlePathClip(gdSpanRlePtr rle, const gdSpanRlePtr clip);
33gdSpanRlePtr gdSpanRleClone(gdSpanRlePtr rle);
34gdSpanRlePtr gdSpanHorizontalClip(const gdSpanRlePtr a, const gdSpanRlePtr b);
35#endif // GD_SPAN_RLE_H
gdFillRule
Definition gd_vector2d.h:224
Affine transformation matrix.
Definition gd_vector2d.h:139
Floating-point rectangle.
Definition gd_vector2d.h:160