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

ref: e8e5e259a67a204766a9dcc5fbb3b68c0674af94 CTU-FEE-B0B35APO-Semestral-project/image-viewer/include/coords.h -rw-r--r-- 518 bytes
e8e5e259 — František Boháček fix: close program after not loading image 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