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 enum { 9 FZ_TRANSITION_NONE = 0, /* aka 'R' or 'REPLACE' */ 10 FZ_TRANSITION_SPLIT, 11 FZ_TRANSITION_BLINDS, 12 FZ_TRANSITION_BOX, 13 FZ_TRANSITION_WIPE, 14 FZ_TRANSITION_DISSOLVE, 15 FZ_TRANSITION_GLITTER, 16 FZ_TRANSITION_FLY, 17 FZ_TRANSITION_PUSH, 18 FZ_TRANSITION_COVER, 19 FZ_TRANSITION_UNCOVER, 20 FZ_TRANSITION_FADE 21 }; 22 23 typedef struct 24 { 25 int type; 26 float duration; /* Effect duration (seconds) */ 27 28 /* Parameters controlling the effect */ 29 int vertical; /* 0 or 1 */ 30 int outwards; /* 0 or 1 */ 31 int direction; /* Degrees */ 32 /* Potentially more to come */ 33 34 /* State variables for use of the transition code */ 35 int state0; 36 int state1; 37 } fz_transition; 38 39 /** 40 Generate a frame of a transition. 41 42 tpix: Target pixmap 43 opix: Old pixmap 44 npix: New pixmap 45 time: Position within the transition (0 to 256) 46 trans: Transition details 47 48 Returns 1 if successfully generated a frame. 49 50 Note: Pixmaps must include alpha. 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