74 const float x1 = b->screen.x;
75 const float x2 = b->screen.x + b->screen.width;
76 const float y1 = b->screen.y;
77 const float y2 = b->screen.y + b->screen.height;
80 if(
x > x1 && x < x2 && y > y1 && y < y2)
83 float dd = sqf(x1 -
x);
84 dd = fminf(dd, sqf(x2 -
x));
85 dd = fminf(dd, sqf(y1 - y));
86 dd = fminf(dd, sqf(y2 - y));
108 pos->
x = (ref->
x - ofsx) / page_width;
109 pos->
y = (ref->
y - ofsy) / page_height;
115 const float px,
const float py,
const float pwidth,
const float pheight,
116 const float ax,
const float ay,
const float awidth,
const float aheight,
130 px, py, pwidth, pheight);
132 ax, ay, awidth, aheight);
155 const float x,
const float y,
170 fmaxf(100.0f,
width));
200 const float page_width,
const float page_height,
201 const int resolution)
305 const int32_t imgid,
const int32_t
width,
const int32_t
height,
327 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,...)
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