00001 // Filename: charBitmap.h 00002 // Created by: drose (16Feb01) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 00020 #ifndef CHARBITMAP_H 00021 #define CHARBITMAP_H 00022 00023 #include <pandatoolbase.h> 00024 00025 #include "pvector.h" 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Class : CharBitmap 00029 // Description : This defines a single character read from the PK 00030 // file. It stores the kerning information as well as 00031 // the character's decoded bitmap. 00032 //////////////////////////////////////////////////////////////////// 00033 class CharBitmap { 00034 public: 00035 typedef pvector<char> Row; 00036 typedef pvector<Row> Block; 00037 00038 CharBitmap(int character, int width, int height, 00039 int hoff, int voff, double dx, double dy); 00040 00041 bool paint(bool black, int num_pixels, int &repeat); 00042 00043 INLINE int get_width() const; 00044 INLINE int get_height() const; 00045 00046 int _character; 00047 int _hoff, _voff; 00048 double _dx, _dy; 00049 00050 Block _block; 00051 unsigned int _x, _y; 00052 }; 00053 00054 #include "charBitmap.I" 00055 00056 #endif