Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
7858 views
1
#ifndef MUPDF_FITZ_TRANSITION_H
2
#define MUPDF_FITZ_TRANSITION_H
3
4
#include "mupdf/fitz/system.h"
5
#include "mupdf/fitz/pixmap.h"
6
7
/* Transition support */
8
typedef struct fz_transition_s fz_transition;
9
10
enum {
11
FZ_TRANSITION_NONE = 0, /* aka 'R' or 'REPLACE' */
12
FZ_TRANSITION_SPLIT,
13
FZ_TRANSITION_BLINDS,
14
FZ_TRANSITION_BOX,
15
FZ_TRANSITION_WIPE,
16
FZ_TRANSITION_DISSOLVE,
17
FZ_TRANSITION_GLITTER,
18
FZ_TRANSITION_FLY,
19
FZ_TRANSITION_PUSH,
20
FZ_TRANSITION_COVER,
21
FZ_TRANSITION_UNCOVER,
22
FZ_TRANSITION_FADE
23
};
24
25
struct fz_transition_s
26
{
27
int type;
28
float duration; /* Effect duration (seconds) */
29
30
/* Parameters controlling the effect */
31
int vertical; /* 0 or 1 */
32
int outwards; /* 0 or 1 */
33
int direction; /* Degrees */
34
/* Potentially more to come */
35
36
/* State variables for use of the transition code */
37
int state0;
38
int state1;
39
};
40
41
/*
42
fz_generate_transition: Generate a frame of a transition.
43
44
tpix: Target pixmap
45
opix: Old pixmap
46
npix: New pixmap
47
time: Position within the transition (0 to 256)
48
trans: Transition details
49
50
Returns 1 if successfully generated a frame.
51
*/
52
int fz_generate_transition(fz_context *ctx, fz_pixmap *tpix, fz_pixmap *opix, fz_pixmap *npix, int time, fz_transition *trans);
53
54
#endif
55
56