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

Password:

OBITMAPW.CPP Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

OBITMAPW.CPP

Go to the documentation of this file.
00001 // Filename    : OBITMAPW.CPP
00002 
00003 #include <OBITMAPW.H>
00004 #include <ALL.H>
00005 
00006 // ------ begin of function BitmapW::init ------//
00007 
00008 void BitmapW::init(short w, short h) {
00009     width_field = w;
00010     height_field = h;
00011 }
00012 
00013 // ------ end of function BitmapW::init ------//
00014 
00015 // ------ begin of function BitmapW::get_pitch ------//
00016 
00017 short BitmapW::get_pitch() {
00018     return width_field;
00019 }
00020 
00021 // ------ end of function BitmapW::get_pitch ------//
00022 
00023 // ------ begin of function BitmapW::get_true_pitch ------//
00024 
00025 short BitmapW::get_true_pitch() {
00026     return width_field * sizeof(short);
00027 }
00028 
00029 // ------ end of function BitmapW::get_pitch ------//
00030 
00031 // ------ begin of function BitmapW::get_ptr -------//
00032 short *BitmapW::get_ptr(short x, short y) {
00033     return bitmap + y * width_field + x;
00034 }
00035 
00036 // ------ end of function BitmapW::get_ptr -------//
00037 
00038 // ------ begin of function BitmapW::size ------//
00039 
00040 long BitmapW::size() {
00041     return sizeof(width_field)+sizeof(height_field)+ width_field*height_field*sizeof(short);
00042 }
00043 
00044 // ------ end of function BitmapW::size ------//
00045 
00046 // ------ begin of function BitmapW::size ------//
00047 
00048 long BitmapW::size(short w, short h) {
00049     return sizeof(short)+sizeof(short)+ w*h*sizeof(short);
00050 }
00051 
00052 // ------ end of function BitmapW::size ------//
00053 
00054 // ------ begin of function BitmapW::mem_add_bitmap ------//
00055 
00056 BitmapW *BitmapW::mem_add_bitmap(short w, short h) {
00057     BitmapW *bitmap = (BitmapW *)mem_add(size(w,h));
00058     bitmap->init(w,h);
00059     return bitmap;
00060 }
00061 
00062 // ------ end of function BitmapW::mem_add_bitmap ------//

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