summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/transition.h
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2013-06-17 22:02:22 +0200
committerTor Andersson <tor.andersson@artifex.com>2013-06-18 17:37:13 +0200
commit19126babc37ac8243de60b3ca388bb5102661274 (patch)
treeedcec3f87b5024b6deb6843ca757bbfda81fe44a /include/mupdf/fitz/transition.h
parentcfc58fef94e63dc5a42979e3a9bf806d104462c5 (diff)
downloadmupdf-19126babc37ac8243de60b3ca388bb5102661274.tar.xz
Split fitz.h into subheaders.
Diffstat (limited to 'include/mupdf/fitz/transition.h')
-rw-r--r--include/mupdf/fitz/transition.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/mupdf/fitz/transition.h b/include/mupdf/fitz/transition.h
new file mode 100644
index 00000000..a62df2a6
--- /dev/null
+++ b/include/mupdf/fitz/transition.h
@@ -0,0 +1,51 @@
+#ifndef MUPDF_FITZ_TRANSITION_H
+#define MUPDF_FITZ_TRANSITION_H
+
+/* Transition support */
+typedef struct fz_transition_s fz_transition;
+
+enum {
+ FZ_TRANSITION_NONE = 0, /* aka 'R' or 'REPLACE' */
+ FZ_TRANSITION_SPLIT,
+ FZ_TRANSITION_BLINDS,
+ FZ_TRANSITION_BOX,
+ FZ_TRANSITION_WIPE,
+ FZ_TRANSITION_DISSOLVE,
+ FZ_TRANSITION_GLITTER,
+ FZ_TRANSITION_FLY,
+ FZ_TRANSITION_PUSH,
+ FZ_TRANSITION_COVER,
+ FZ_TRANSITION_UNCOVER,
+ FZ_TRANSITION_FADE
+};
+
+struct fz_transition_s
+{
+ int type;
+ float duration; /* Effect duration (seconds) */
+
+ /* Parameters controlling the effect */
+ int vertical; /* 0 or 1 */
+ int outwards; /* 0 or 1 */
+ int direction; /* Degrees */
+ /* Potentially more to come */
+
+ /* State variables for use of the transition code */
+ int state0;
+ int state1;
+};
+
+/*
+ fz_generate_transition: Generate a frame of a transition.
+
+ tpix: Target pixmap
+ opix: Old pixmap
+ npix: New pixmap
+ time: Position within the transition (0 to 256)
+ trans: Transition details
+
+ Returns 1 if successfully generated a frame.
+*/
+int fz_generate_transition(fz_pixmap *tpix, fz_pixmap *opix, fz_pixmap *npix, int time, fz_transition *trans);
+
+#endif