aboutsummaryrefslogtreecommitdiff
path: root/src/image.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.h')
-rw-r--r--src/image.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/image.h b/src/image.h
index 5b17fff..4e6d73d 100644
--- a/src/image.h
+++ b/src/image.h
@@ -4,20 +4,7 @@
#include <SDL2/SDL.h>
#include <FreeImage.h>
-struct imv_image {
- int width; /* width of the image overall */
- int height; /* height of the image overall */
- int num_chunks; /* number of chunks allocated */
- SDL_Texture **chunks; /* array of chunks */
- int num_chunks_wide; /* number of chunks per row of the image */
- int num_chunks_tall; /* number of chunks per column of the image */
- int chunk_width; /* chunk width */
- int chunk_height; /* chunk height */
- int last_chunk_width; /* width of rightmost chunk */
- int last_chunk_height; /* height of bottommost chunk */
- SDL_Renderer *renderer; /* SDL renderer to draw to */
-};
-
+struct imv_image;
/* Creates an instance of imv_image */
struct imv_image *imv_image_create(SDL_Renderer *r);
@@ -31,6 +18,12 @@ int imv_image_set_bitmap(struct imv_image *image, FIBITMAP *bmp);
/* Draw the image at the given position with the given scale */
void imv_image_draw(struct imv_image *image, int x, int y, double scale);
+/* Get the image width */
+int imv_image_width(const struct imv_image *image);
+
+/* Get the image height */
+int imv_image_height(const struct imv_image *image);
+
#endif