summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-21 14:18:08 +0100
committerSam James <sam@gentoo.org>2022-10-02 04:31:25 +0100
commita529111f77ff46f4836fe7312e70953bc16587cf (patch)
tree9dc3924cb1a6ef3ef853b7bb45f735365e0b4e6d /extract/include
parentImport Ghostscript 9.56.1 (diff)
downloadghostscript-gpl-patches-ghostscript-10.tar.gz
ghostscript-gpl-patches-ghostscript-10.tar.bz2
ghostscript-gpl-patches-ghostscript-10.zip
Import Ghostscript 10.0ghostscript-10.0ghostscript-10
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'extract/include')
-rw-r--r--extract/include/extract.h33
1 files changed, 23 insertions, 10 deletions
diff --git a/extract/include/extract.h b/extract/include/extract.h
index b01ba6f3..5e0b09fc 100644
--- a/extract/include/extract.h
+++ b/extract/include/extract.h
@@ -10,13 +10,13 @@ set.
#include "extract_alloc.h"
#include "extract_buffer.h"
+#include <float.h>
typedef struct extract_t extract_t;
/* Abstract state for processing a document. */
-
typedef enum
{
extract_format_ODT,
@@ -50,7 +50,7 @@ allocation will be done with <alloc> (which can be NULL in which case we use
malloc/free, or from extract_alloc_create()). */
-int extract_page_begin(extract_t* extract);
+int extract_page_begin(extract_t* extract, double minx, double miny, double maxx, double maxy);
/* Must be called before extract_span_begin(). */
@@ -73,7 +73,7 @@ int extract_span_begin(
double trm_e,
double trm_f
);
-/* Starts a new span.
+/* Starts a new span.
extract
As passed to earlier call to extract_begin().
font_name
@@ -92,12 +92,16 @@ trm_*
int extract_add_char(
- extract_t* extract,
- double x,
- double y,
- unsigned ucs,
- double adv,
- int autosplit
+ extract_t* extract,
+ double x,
+ double y,
+ unsigned ucs,
+ double adv,
+ int autosplit,
+ double minx,
+ double miny,
+ double maxx,
+ double maxy
);
/* Appends specified character to current span.
extract
@@ -112,6 +116,8 @@ adv
Advance of this character.
autosplit
Ignored as of 2021-07-02.
+minx, miny, maxx, maxy
+ Glyph bbox
*/
@@ -262,7 +268,7 @@ archive by extract_write()). */
int extract_write_template(
- extract_t* extract,
+ extract_t* extract,
const char* path_template,
const char* path_out,
int preserve_dir
@@ -290,6 +296,10 @@ void extract_end( extract_t** pextract);
/* Frees all data associated with *pextract and sets *pextract to NULL. */
+int extract_set_layout_analysis(extract_t* extract, int enable);
+/* Enables/Disables the layout analysis phase. */
+
+
/* Things below are not generally used. */
int extract_tables_csv_format(extract_t* extract, const char* path_format);
@@ -318,4 +328,7 @@ allocate in powers of two times this size. This is an attempt to improve speed
with memento squeeze. Default is 0 (every call to extract_realloc() calls
realloc(). */
+void extract_analyse(extract_t *extract);
+/* Analyse the structure of the current page. */
+
#endif