~ruther/CTU-FEE-B0B35APO-Semestral-project

ref: 0631e1405d2c7df9ef0d24a9c1bdf3f43128c9c5 CTU-FEE-B0B35APO-Semestral-project/image-viewer/include/coords.h -rw-r--r-- 518 bytes
0631e140 — František Boháček refactor: move logger to library 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdint.h>
#include "image.h"
#include "display_utils.h"

typedef struct {
  int32_t x;
  int32_t y;
} coords_t;

coords_t coords_create(int32_t x, int32_t y);
coords_t coords_get_image_screen_beg_coord(
    image_t *image, image_zoom_t zoom);
coords_t coords_get_image_screen_end_coords(image_t *image, image_zoom_t zoom);

coords_t image_get_screen_coords(image_t *image, image_zoom_t zoom, coords_t image_coords);
coords_t image_get_image_coords(image_t *image, image_zoom_t zoom, coords_t screen_coords);