77 const float x1 = b->screen.x;
78 const float x2 = b->screen.x + b->screen.width;
79 const float y1 = b->screen.y;
80 const float y2 = b->screen.y + b->screen.height;
83 if(
x > x1 && x < x2 && y > y1 && y < y2)
86 float dd = sqf(x1 -
x);
87 dd = fminf(dd, sqf(x2 -
x));
88 dd = fminf(dd, sqf(y1 - y));
89 dd = fminf(dd, sqf(y2 - y));
111 pos->
x = (ref->
x - ofsx) / page_width;
112 pos->
y = (ref->
y - ofsy) / page_height;
118 const float px,
const float py,
const float pwidth,
const float pheight,
119 const float ax,
const float ay,
const float awidth,
const float aheight,
133 px, py, pwidth, pheight);
135 ax, ay, awidth, aheight);
158 const float x,
const float y,
173 fmaxf(100.0f,
width));
203 const float page_width,
const float page_height,
204 const int resolution)
308 const int32_t imgid,
const int32_t
width,
const int32_t
height,
330 dt_image_pos pos = { .
x = 0, .y = 0, .width = 0, .height = 0 };
static double dist(double x1, double y1, double x2, double y2)
void dt_print(dt_debug_thread_t thread, const char *msg,...) __attribute__((format(printf
Print to stdout when thread is enabled, prefixed with seconds since startup.
float *const restrict const size_t k
#define dt_pdf_point_to_pixel(pt, dpi)
#define dt_pdf_mm_to_point(mm)
void _align_pos(const dt_image_pos *ref, const dt_alignment_t alignment, const int32_t width, const int32_t height, dt_image_pos *pos)
void dt_printing_get_screen_pos(const dt_images_box *imgs, const dt_image_box *img, dt_image_pos *pos)
void _clear_pos(dt_image_pos *pos)
void dt_printing_setup_display(dt_images_box *imgs, const float px, const float py, const float pwidth, const float pheight, const float ax, const float ay, const float awidth, const float aheight, gboolean borderless)
void dt_printing_get_image_pos(const dt_images_box *imgs, const dt_image_box *img, dt_image_pos *pos)
int32_t dt_printing_get_image_box(const dt_images_box *imgs, const int x, const int y)
void dt_printing_clear_box(dt_image_box *img)
void dt_printing_setup_box(dt_images_box *imgs, const int idx, const float x, const float y, const float width, const float height)
void _compute_rel_pos(const dt_images_box *imgs, const dt_image_pos *ref, dt_image_pos *pos)
void dt_printing_setup_image(dt_images_box *imgs, const int idx, const int32_t imgid, const int32_t width, const int32_t height, const dt_alignment_t alignment)
void dt_printing_get_screen_rel_pos(const dt_images_box *imgs, const dt_image_box *img, dt_image_pos *pos)
void dt_printing_setup_page(dt_images_box *imgs, const float page_width, const float page_height, const int resolution)
void dt_printing_clear_boxes(dt_images_box *imgs)
void dt_printing_get_image_pos_mm(const dt_images_box *imgs, const dt_image_box *img, dt_image_pos *pos)
#define MAX_IMAGE_PER_PAGE