00001
00002
00003
00004 #ifndef __OBLOB2W_H
00005 #define __OBLOB2W_H
00006
00007 #include <OBITMAPW.H>
00008
00009
00010
00013 class Blob2DW {
00014 public:
00015 BitmapW *ptr;
00016 unsigned int alloc_size;
00017 short left_edge;
00018 short top_edge;
00019 short width;
00020 short height;
00021
00022 public:
00023 Blob2DW();
00024 Blob2DW( Blob2DW & );
00025 ~Blob2DW();
00026
00027 Blob2DW& operator=(Blob2DW &);
00028
00029 void resize(short left, short top, short w, short h);
00030 int extend_to(short x, short y);
00031 int extend_to(short x1, short y1, short x2, short y2);
00032
00033 short *bitmap_ptr() { return (short *)ptr; }
00034 short *buf_ptr() { return ptr->bitmap; }
00035 int buf_pitch() { return ptr->get_pitch(); }
00036 int buf_true_pitch() { return ptr->get_true_pitch(); }
00037 short *p(short x, short y, int autoExtend=1);
00038 void fill_area(short x1, short y1, short x2, short y2, short color,
00039 int autoExtend=1);
00040 void auto_clip(short *pLeft, short *pTop, short *pWidth, short *pHeight, int autoResize=1);
00041
00042 void clear();
00043 int is_clear() { return width == 0 && height == 0; }
00044 };
00045 #endif