Просмотр исходного кода

Removed im member from img struct

master
Bert 14 лет назад
Родитель
Сommit
6851d5c4e5
2 измененных файлов: 4 добавлений и 5 удалений
  1. +4
    -2
      image.c
  2. +0
    -3
      image.h

+ 4
- 2
image.c Просмотреть файл

@@ -40,16 +40,18 @@ void imlib_destroy() {
} }


void img_load(img_t *img, const char *filename) { void img_load(img_t *img, const char *filename) {
Imlib_Image *im;

if (!img || !filename) if (!img || !filename)
return; return;


if (imlib_context_get_image()) if (imlib_context_get_image())
imlib_free_image(); imlib_free_image();


if (!(img->im = imlib_load_image(filename)))
if (!(im = imlib_load_image(filename)))
DIE("could not open image: %s", filename); DIE("could not open image: %s", filename);


imlib_context_set_image(img->im);
imlib_context_set_image(im);


img->w = imlib_image_get_width(); img->w = imlib_image_get_width();
img->h = imlib_image_get_height(); img->h = imlib_image_get_height();


+ 0
- 3
image.h Просмотреть файл

@@ -19,8 +19,6 @@
#ifndef IMAGE_H #ifndef IMAGE_H
#define IMAGE_H #define IMAGE_H


#include <Imlib2.h>

#include "window.h" #include "window.h"


typedef enum scalemode_e { typedef enum scalemode_e {
@@ -36,7 +34,6 @@ typedef struct img_s {
int h; int h;
int x; int x;
int y; int y;
Imlib_Image *im;
} img_t; } img_t;


void imlib_init(win_t*); void imlib_init(win_t*);


Загрузка…
Отмена
Сохранить