summaryrefslogtreecommitdiff
path: root/fitz/fitz.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2013-04-23 18:55:26 +0100
committerRobin Watts <robin.watts@artifex.com>2013-04-26 14:42:51 +0100
commitc06007db0978041d6b60125929d0ca412f36e18e (patch)
treeb2aec4da0a6205175b77c4485ab57deb9fe9c0e2 /fitz/fitz.h
parentbbf2da4a518d02d83fd939fd716f09f4daa2546a (diff)
downloadmupdf-c06007db0978041d6b60125929d0ca412f36e18e.tar.xz
Hint enabling/disabling for devices.
Add configuration functions to control the hints set on a given device. Use this to set whether image data is captured or not in the text extraction process. Also update the display list device to respect the device hints during playback.
Diffstat (limited to 'fitz/fitz.h')
-rw-r--r--fitz/fitz.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/fitz/fitz.h b/fitz/fitz.h
index d3a554f4..b298877a 100644
--- a/fitz/fitz.h
+++ b/fitz/fitz.h
@@ -1839,6 +1839,37 @@ fz_device *fz_new_draw_device(fz_context *ctx, fz_pixmap *dest);
fz_device *fz_new_draw_device_with_bbox(fz_context *ctx, fz_pixmap *dest, const fz_irect *clip);
/*
+ fz_enable_device_hints : Enable hints in a device.
+
+ hints: mask of hints to enable.
+
+ For example: By default the draw device renders shadings. For some
+ purposes (perhaps rendering fast low quality thumbnails) you may want
+ to tell it to ignore shadings. For this you would enable the
+ FZ_IGNORE_SHADE hint.
+*/
+void fz_enable_device_hints(fz_device *dev, int hints);
+
+/*
+ fz_disable_device_hints : Disable hints in a device.
+
+ hints: mask of hints to disable.
+
+ For example: By default the text extraction device ignores images.
+ For some purposes however (such as extracting HTML) you may want to
+ enable the capturing of image data too. For this you would disable
+ the FZ_IGNORE_IMAGE hint.
+*/
+void fz_disable_device_hints(fz_device *dev, int hints);
+
+enum
+{
+ /* Hints */
+ FZ_IGNORE_IMAGE = 1,
+ FZ_IGNORE_SHADE = 2,
+};
+
+/*
Text extraction device: Used for searching, format conversion etc.
(In development - Subject to change in future versions)