Ignore:
Timestamp:
Apr 22, 2011, 4:13:04 AM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: some cleaning up in trans_image before I templatise half of it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/timage.h

    r524 r527  
    2525class trans_image       // transpernet image
    2626{
    27   unsigned char *data;
    28   short w,h;
     27public:
     28  trans_image(image *im, char const *name);  // name has no meaning if MEM_CHECK is off
    2929
    30 public :
    31   short height() { return h; }
    32   short width() { return w; }
    33   trans_image(image *im, char const *name);  // name has no meaning if MEM_CHECK is off
     30  inline vec2i Size() { return m_size; }
     31  uint8_t *Data() { return m_data; }
     32
    3433  void put_image(image *screen, int x, int y);   // always transparent
    3534
     
    5453  void put_predator(image *screen, int x, int y);
    5554  void put_scan_line(image *screen, int x, int y, int line);   // always transparent
    56   unsigned char *t_data() { return data; }
    57   int size();
     55  size_t MemUsage();
    5856  image *make_image();
    59   ~trans_image() { free(data); }
     57  ~trans_image();
    6058
    6159private:
    6260  uint8_t *ClipToLine(image *screen, int x1, int y1, int x2, int y2,
    6361                      int x, int &y, int &ysteps);
    64 } ;
    6562
     63  vec2i m_size;
     64  uint8_t *m_data;
     65};
    6666
    6767#endif
    6868
    69 
    70 
    71 
    72 
Note: See TracChangeset for help on using the changeset viewer.