File: constants.h

package info (click to toggle)
unpaper 7.0.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 66,388 kB
  • sloc: ansic: 3,620; python: 304; makefile: 15; sh: 1
file content (54 lines) | stat: -rw-r--r-- 1,304 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// SPDX-FileCopyrightText: 2005 The unpaper authors
//
// SPDX-License-Identifier: GPL-2.0-only

#pragma once

#define MAX_MULTI_INDEX                                                        \
  10000 // maximum pixel count of virtual line to detect rotation with
#define MAX_ROTATION_SCAN_SIZE                                                 \
  10000 // maximum pixel count of virtual line to detect rotation with
#define MAX_MASKS 100
#define MAX_POINTS 100
#define MAX_FILES 100
#define MAX_PAGES 2
#define WHITE 0xFF
#define GRAY 0x1F
#define BLACK 0x00
#define WHITE24 0xFFFFFF
#define GRAY24 0x1F1F1F
#define BLACK24 0x000000
#define BLANK_TEXT "<blank>"

typedef enum {
  VERBOSE_QUIET = -1,
  VERBOSE_NONE = 0,
  VERBOSE_NORMAL = 1,
  VERBOSE_MORE = 2,
  VERBOSE_DEBUG = 3,
  VERBOSE_DEBUG_SAVE = 4
} VERBOSE_LEVEL;

typedef enum { X, Y, COORDINATES_COUNT } COORDINATES;

typedef enum { WIDTH, HEIGHT, DIMENSIONS_COUNT } DIMENSIONS;

typedef enum { HORIZONTAL, VERTICAL, DIRECTIONS_COUNT } DIRECTIONS;

typedef enum { LEFT, TOP, RIGHT, BOTTOM, EDGES_COUNT } EDGES;

typedef int Mask[EDGES_COUNT];

typedef enum {
  LAYOUT_NONE,
  LAYOUT_SINGLE,
  LAYOUT_DOUBLE,
  LAYOUTS_COUNT
} LAYOUTS;

typedef enum {
  INTERP_NN,
  INTERP_LINEAR,
  INTERP_CUBIC,
  INTERP_FUNCTIONS_COUNT
} INTERP_FUNCTIONS;