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

ref: 36bff98eca91faf83f965e3dcfeb882007c1ce56 CTU-FEE-B0B35APO-Semestral-project/image-viewer/include/coords.h -rw-r--r-- 518 bytes
36bff98e — František Boháček feat: add font utils 3 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);
Do not follow this link