![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <glib.h>
#include <glib/gi18n.h>
#include <inttypes.h>
#include <stdio.h>
Go to the source code of this file.
Data Structures | |
struct | dt_pdf_t |
struct | dt_pdf_image_t |
struct | dt_pdf_page_t |
Macros | |
#define | dt_pdf_inch_to_point(inch) ((inch) * 72.0) |
#define | dt_pdf_point_to_inch(pt) ((pt) / 72.0) |
#define | dt_pdf_mm_to_point(mm) dt_pdf_inch_to_point((mm) / 25.4) |
#define | dt_pdf_point_to_mm(pt) dt_pdf_point_to_inch((pt) * 25.4) |
#define | dt_pdf_point_to_pixel(pt, dpi) (dt_pdf_point_to_inch(pt) * (dpi)) |
#define | dt_pdf_pixel_to_point(px, dpi) (dt_pdf_inch_to_point((px) / (dpi))) |
Typedefs | |
typedef enum dt_pdf_stream_encoder_t | dt_pdf_stream_encoder_t |
typedef struct dt_pdf_t | dt_pdf_t |
typedef struct dt_pdf_image_t | dt_pdf_image_t |
typedef struct dt_pdf_page_t | dt_pdf_page_t |
Enumerations | |
enum | dt_pdf_stream_encoder_t { DT_PDF_STREAM_ENCODER_ASCII_HEX = 0 , DT_PDF_STREAM_ENCODER_FLATE = 1 } |
Functions | |
dt_pdf_t * | dt_pdf_start (const char *filename, float width, float height, float dpi, dt_pdf_stream_encoder_t default_encoder) |
int | dt_pdf_add_icc (dt_pdf_t *pdf, const char *filename) |
int | dt_pdf_add_icc_from_data (dt_pdf_t *pdf, const unsigned char *data, size_t size) |
dt_pdf_image_t * | dt_pdf_add_image (dt_pdf_t *pdf, const unsigned char *image, int width, int height, int bpp, int icc_id, float border) |
dt_pdf_page_t * | dt_pdf_add_page (dt_pdf_t *pdf, dt_pdf_image_t **images, int n_images) |
void | dt_pdf_finish (dt_pdf_t *pdf, dt_pdf_page_t **pages, int n_pages) |
int | dt_pdf_parse_length (const char *str, float *length) |
int | dt_pdf_parse_paper_size (const char *str, float *width, float *height) |
Variables | ||
struct { | ||
const char * name | ||
const float factor | ||
} | dt_pdf_units [] | |
static const int | dt_pdf_units_n = sizeof(dt_pdf_units) / sizeof(dt_pdf_units[0]) | |
struct { | ||
const char * name | ||
const float width | ||
const float height | ||
} | dt_pdf_paper_sizes [] | |
static const int | dt_pdf_paper_sizes_n = sizeof(dt_pdf_paper_sizes) / sizeof(dt_pdf_paper_sizes[0]) - 1 | |
#define dt_pdf_inch_to_point | ( | inch | ) | ((inch) * 72.0) |
#define dt_pdf_mm_to_point | ( | mm | ) | dt_pdf_inch_to_point((mm) / 25.4) |
#define dt_pdf_pixel_to_point | ( | px, | |
dpi | |||
) | (dt_pdf_inch_to_point((px) / (dpi))) |
#define dt_pdf_point_to_inch | ( | pt | ) | ((pt) / 72.0) |
#define dt_pdf_point_to_mm | ( | pt | ) | dt_pdf_point_to_inch((pt) * 25.4) |
#define dt_pdf_point_to_pixel | ( | pt, | |
dpi | |||
) | (dt_pdf_point_to_inch(pt) * (dpi)) |
typedef struct dt_pdf_image_t dt_pdf_image_t |
typedef struct dt_pdf_page_t dt_pdf_page_t |
typedef enum dt_pdf_stream_encoder_t dt_pdf_stream_encoder_t |
int dt_pdf_add_icc | ( | dt_pdf_t * | pdf, |
const char * | filename | ||
) |
References dt_pdf_add_icc_from_data(), and dt_read_file().
int dt_pdf_add_icc_from_data | ( | dt_pdf_t * | pdf, |
const unsigned char * | data, | ||
size_t | size | ||
) |
References _pdf_set_offset(), _pdf_stream_encoder_ASCIIHex(), dt_pdf_t::bytes_written, dt_pdf_t::fd, dt_pdf_t::next_id, and size.
Referenced by dt_pdf_add_icc(), and write_image().
dt_pdf_image_t * dt_pdf_add_image | ( | dt_pdf_t * | pdf, |
const unsigned char * | image, | ||
int | width, | ||
int | height, | ||
int | bpp, | ||
int | icc_id, | ||
float | border | ||
) |
References _pdf_set_offset(), _pdf_write_stream(), dt_pdf_image_t::bb_height, dt_pdf_image_t::bb_width, dt_pdf_image_t::bb_x, dt_pdf_image_t::bb_y, bpp, dt_pdf_t::bytes_written, dt_pdf_t::default_encoder, dt_pdf_t::fd, height, dt_pdf_image_t::height, dt_pdf_image_t::name_id, dt_pdf_t::next_id, dt_pdf_t::next_image, dt_pdf_image_t::object_id, dt_pdf_image_t::outline_mode, dt_pdf_t::page_height, dt_pdf_t::page_width, dt_pdf_image_t::size, stream_encoder_filters, width, and dt_pdf_image_t::width.
Referenced by _create_pdf(), and write_image().
dt_pdf_page_t * dt_pdf_add_page | ( | dt_pdf_t * | pdf, |
dt_pdf_image_t ** | images, | ||
int | n_images | ||
) |
References _pdf_set_offset(), dt_pdf_image_t::bb_height, dt_pdf_image_t::bb_width, dt_pdf_image_t::bb_x, dt_pdf_image_t::bb_y, dt_pdf_t::bytes_written, dt_pdf_t::dpi, dt_pdf_t::fd, height, dt_pdf_image_t::height, MIN, dt_pdf_image_t::name_id, dt_pdf_t::next_id, dt_pdf_image_t::object_id, dt_pdf_page_t::object_id, dt_pdf_t::page_height, dt_pdf_t::page_width, dt_pdf_image_t::rotate_to_fit, dt_pdf_page_t::size, width, and dt_pdf_image_t::width.
Referenced by _create_pdf(), and write_image().
void dt_pdf_finish | ( | dt_pdf_t * | pdf, |
dt_pdf_page_t ** | pages, | ||
int | n_pages | ||
) |
References _pdf_set_offset(), dt_pdf_t::bytes_written, dt_pdf_t::fd, gmt, dt_pdf_t::next_id, dt_pdf_page_t::object_id, dt_pdf_t::offsets, PACKAGE_STRING, size, and dt_pdf_t::title.
Referenced by _create_pdf(), free_params(), and write_image().
int dt_pdf_parse_length | ( | const char * | str, |
float * | length | ||
) |
References dt_pdf_units, name, and SKIP_SPACES.
Referenced by _paper_size().
int dt_pdf_parse_paper_size | ( | const char * | str, |
float * | width, | ||
float * | height | ||
) |
References dt_pdf_paper_sizes, dt_pdf_units, FALSE, height, name, SKIP_SPACES, TRUE, and width.
Referenced by _paper_size(), and _set_paper_size().
dt_pdf_t * dt_pdf_start | ( | const char * | filename, |
float | width, | ||
float | height, | ||
float | dpi, | ||
dt_pdf_stream_encoder_t | default_encoder | ||
) |
References _pdf_set_offset(), dt_pdf_t::bytes_written, dt_pdf_t::default_encoder, dt_pdf_t::dpi, dt_pdf_t::fd, height, dt_pdf_t::n_offsets, dt_pdf_t::next_id, dt_pdf_t::next_image, dt_pdf_t::offsets, dt_pdf_t::page_height, dt_pdf_t::page_width, and width.
Referenced by _create_pdf(), and write_image().
const struct { ... } dt_pdf_paper_sizes[] |
Referenced by _set_paper_size(), dt_pdf_parse_paper_size(), gui_init(), and size_toggle_callback().
|
static |
Referenced by _set_paper_size(), and size_toggle_callback().
const struct { ... } dt_pdf_units[] |
Referenced by dt_pdf_parse_length(), and dt_pdf_parse_paper_size().
|
static |
const float factor |
Referenced by _bh_round_to_n_digits(), _blendif_compute_factor(), _blendif_compute_factor(), _blendif_compute_factor(), _blendif_hsl(), _blendif_jzczhz(), _blendif_lch(), _blendop_blendif_boost_factor_callback(), _compute_range(), _default_process_tiling_ptp(), _default_process_tiling_roi(), _diffuse_error(), _display_channel(), _display_channel(), _display_channel(), _ellipse_events_mouse_scrolled(), _get_brush_smoothing(), _normalize_color(), _util_get_svg_img(), distort_backtransform(), distort_transform(), dt_bauhaus_slider_set_factor(), dt_exif_xmp_decode(), dt_exif_xmp_encode_internal(), dt_tiling_piece_fits_host_memory(), legacy_params(), and scrolled().
const float height |
const char* name |
const float width |