Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

Header.hh

Go to the documentation of this file.
00001 /*
00002     libpdf++: a C++ Free library to generate PDF file
00003     Copyright (C) 2002 Nestal Wan
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Lesser General Public
00007     License as published by the Free Software Foundation; either
00008     version 2.1 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Lesser General Public License for more details.
00014 
00015     You should have received a copy of the GNU Lesser General Public
00016     License along with this library; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00026 #ifndef __IMAGE_HEADER_HEADER_INCLUDED__
00027 #define __IMAGE_HEADER_HEADER_INCLUDED__
00028 
00029 #ifndef __IMAGE_COLOUR_SPACE_INCLUDED__
00030 #include "ColourSpace.hh"
00031 #endif
00032 
00033 namespace image {
00034 
00079 class CHeader
00080 {
00081 private :
00084     int m_width, m_height ;
00086 
00089     double m_x_resolution, m_y_resolution ;
00091     
00093     int m_channel_per_pixel ;
00094     
00096     int m_bit_per_channel ;
00097     
00099     CColourSpace m_colour ;
00100 
00101 public :
00102     CHeader( ) ;
00103     CHeader( int width, int height, int channel_per_pixel,
00104              int bit_per_channel, CColourSpace colour,
00105              double x_resolution, double y_resolution ) ;
00106     ~CHeader( ) ;
00107 
00108     // data access
00109     int Width( ) const ;
00110     int Height( ) const ;
00111     const CColourSpace ColourSpace( ) const ;
00112     int BitPerChannel( ) const ;
00113     int ChannelPerPixel( ) const ;
00114     double XResolution( ) const ;
00115     double YResolution( ) const ;
00116     
00117     // STL style functions
00118     void Assign( int width, int height, int channel_per_pixel,
00119                  int bit_per_channel, CColourSpace colour,
00120                  double x_resolution, double y_resolution ) ;
00121     bool Empty( ) const ;
00122     void Clear( ) ;
00123 
00124     // operations
00125     double RealWidth( ) const ;
00126     double RealHeight( ) const ;
00127 
00128 private :
00129 #ifdef _DEBUG
00130     bool IsValid( ) const ;
00131 #endif
00132 } ;
00133 
00134 } // end of namespace
00135 
00136 #endif

Generated on Sun Feb 2 09:16:05 2003 for libpdf++ by doxygen1.2.16