Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

OBLOB2.H Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

OBLOB2.H

Go to the documentation of this file.
00001 // Filename    : OBLOB2.H
00002 // Description : header file of 2D binary block, four side extensible
00003 
00004 #ifndef __OBLOB2_H
00005 #define __OBLOB2_H
00006 
00007 #include <OBITMAP.H>
00008 
00009 // ------- define class Blob2D ----------//
00010 
00012 class Blob2D {
00013 public:
00014     Bitmap *ptr;
00015     unsigned int alloc_size;
00016     short left_edge;
00017     short top_edge;
00018     short width;
00019     short height;
00020 
00021 public:
00022     Blob2D();
00023     Blob2D( Blob2D & );
00024     ~Blob2D();
00025 
00026     Blob2D& operator=(Blob2D &);
00027 
00028     void  resize(short left, short top, short w, short h);
00029     int extend_to(short x, short y);
00030     int extend_to(short x1, short y1, short x2, short y2);
00031 
00032     char *bitmap_ptr()  { return (char *)ptr; }
00033     char *buf_ptr()   { return (char *)ptr->bitmap; }
00034     int buf_pitch()   { return ptr->get_pitch(); }
00035     unsigned char *p(short x, short y, int autoExtend=1);
00036     void  fill_area(short x1, short y1, short x2, short y2, unsigned char color,
00037                     int autoExtend=1);
00038     void  auto_clip(short *pLeft, short *pTop, short *pWidth, short *pHeight, int autoResize=1);
00039 
00040     void  clear();
00041     int is_clear()  { return width == 0 && height == 0; }
00042 };
00043 #endif

Generated on Fri Aug 23 01:37:15 2002 for VirtualU by doxygen1.2.17