diff options
Diffstat (limited to 'include/painter/rasterizer.h')
-rw-r--r-- | include/painter/rasterizer.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/painter/rasterizer.h b/include/painter/rasterizer.h new file mode 100644 index 0000000..204d616 --- /dev/null +++ b/include/painter/rasterizer.h | |||
@@ -0,0 +1,41 @@ | |||
1 | #ifndef UPEM_MORPHING_RASTERIZER | ||
2 | #define UPEM_MORPHING_RASTERIZER | ||
3 | |||
4 | /** | ||
5 | * File: rasterizer.h | ||
6 | */ | ||
7 | |||
8 | #include "painter/canvas.h" | ||
9 | #include "morpher/morphing.h" | ||
10 | |||
11 | /** | ||
12 | * Struct: RasterizationContext | ||
13 | */ | ||
14 | typedef struct { | ||
15 | Canvas *result, *source, *target; | ||
16 | TimeVector frame; | ||
17 | } RasterizationContext; | ||
18 | |||
19 | /** | ||
20 | * Struct: TriangleContext | ||
21 | */ | ||
22 | typedef struct { | ||
23 | Triangle current, source, target; | ||
24 | } TriangleContext; | ||
25 | |||
26 | /** | ||
27 | * Function: rasterize | ||
28 | * Rasterises a morphing from a source and a target image at the given time frame. | ||
29 | * | ||
30 | * Parameters: | ||
31 | * *source - source image canvas | ||
32 | * *target - target image canvas | ||
33 | * *m - reference morphing | ||
34 | * frame - time frame | ||
35 | * | ||
36 | * Returns: | ||
37 | * The drawn canvas, dynamically allocated | ||
38 | */ | ||
39 | Canvas *rasterize(Canvas *source, Canvas *target, Morphing *m, TimeVector frame); | ||
40 | |||
41 | #endif | ||