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

Password:

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

ORECT.CPP

Go to the documentation of this file.
00001 //Filename    : ORECT.cpp
00002 //Description : RECT Class Definition
00003 //Owner       : Fred
00004 
00005 #include "ORECT.h"
00006 
00007 //----------- Begin of function Rect Constructor -----//
00009 Rect::Rect(short inX1, short inY1, short inX2, short inY2) {
00010     x1 = inX1;
00011     y1 = inY1;
00012     x2 = inX2;
00013     y2 = inY2;
00014 }
00015 
00016 //------------- End of function Rect Constructor -----//
00017 
00018 //----------- Begin of function Rect::clip_me ------//
00020 void Rect::clip_me(Rect clipRect) {
00021     //TO ? add helper mehtod(s) for this
00022     if ( x1 < clipRect.x1)
00023         x1 = clipRect.x1;
00024     else if ( x1 > clipRect.x2 )
00025         x1 = clipRect.x2;
00026 
00027     if ( x2 < clipRect.x1)
00028         x2 = clipRect.x1;
00029     else if ( x2 > clipRect.x2 )
00030         x2 = clipRect.x2;
00031 
00032     if ( y1 < clipRect.y1)
00033         y1 = clipRect.y1;
00034     else if ( y1 > clipRect.y2 )
00035         y1 = clipRect.y2;
00036 
00037     if ( y2 < clipRect.y1)
00038         y2 = clipRect.y1;
00039     else if ( y2 > clipRect.y2 )
00040         y2 = clipRect.y2;
00041 }
00042 
00043 //------------- End of function Rect::clipRect_me ------//

Generated on Fri Aug 23 01:38:17 2002 for VirtualU by doxygen1.2.17