- Main Page
- Namespaces
- Data Structures
- Files

- File List
- Globals

# FTBuffer.h

Go to the documentation of this file.

    00001 /*
    00002  * FTGL - OpenGL font library
    00003  *
    00004  * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
    00005  *
    00006  * Permission is hereby granted, free of charge, to any person obtaining
    00007  * a copy of this software and associated documentation files (the
    00008  * "Software"), to deal in the Software without restriction, including
    00009  * without limitation the rights to use, copy, modify, merge, publish,
    00010  * distribute, sublicense, and/or sell copies of the Software, and to
    00011  * permit persons to whom the Software is furnished to do so, subject to
    00012  * the following conditions:
    00013  *
    00014  * The above copyright notice and this permission notice shall be
    00015  * included in all copies or substantial portions of the Software.
    00016  *
    00017  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    00018  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    00019  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    00020  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    00021  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    00022  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    00023  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    00024  */
    00025
    00026 #ifndef __ftgl__
    00027 #   warning Please use <FTGL/ftgl.h> instead of <FTBuffer.h>.
    00028 #   include <FTGL/ftgl.h>
    00029 #endif
    00030
    00031 #ifndef __FTBuffer__
    00032 #define __FTBuffer__
    00033
    00034 #ifdef __cplusplus
    00035
    00045 class FTGL_EXPORT FTBuffer
    00046 {
    00047     public:
    00051         FTBuffer();
    00052
    00056         ~FTBuffer();
    00057
    00063         inline FTPoint Pos() const
    00064         {
    00065             return pos;
    00066         }
    00067
    00073         inline void Pos(FTPoint arg)
    00074         {
    00075             pos = arg;
    00076         }
    00077
    00084         void Size(int w, int h);
    00085
    00091         inline int Width() const { return width; }
    00092
    00098         inline int Height() const { return height; }
    00099
    00105         inline unsigned char *Pixels() const { return pixels; }
    00106
    00107     private:
    00111         int width, height;
    00112
    00116         unsigned char *pixels;
    00117
    00121         FTPoint pos;
    00122 };
    00123
    00124 #endif //__cplusplus
    00125
    00126 #endif // __FTBuffer__
    00127