mapgenerator  1.1.2
About: Creates client-side image maps in HTML files.
  Fossies Dox: mapgenerator-1.1.2.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

Frame_Buffer.h
Go to the documentation of this file.
1 #ifndef __FRAME_BUFFER__H
2 #define __FRAME_BUFFER__H
3 //
4 // Copyright 2001 Jim Hourihan
5 //Changes by Gabriel Huber:
6 //added public method resize
7 //added protected methods min_x min_y max_x max_y for the public resize method
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Library General Public
11 // License as published by the Free Software Foundation; either
12 // version 2 of the License, or (at your option) any later version.
13 //
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Library General Public License for more details.
18 //
19 // You should have received a copy of the GNU Library General Public
20 // License along with this library; if not, write to the Free Software
21 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 // USA.
23 //
24 
25 #include <stddef.h>
26 #include "../config.h"
27 
29 {
30  public:
31  Frame_Buffer(size_t w, size_t h, size_t components);
32  ~Frame_Buffer();
33 
34  typedef unsigned char Component;
35 
36  size_t width() const { return _w; }
37  size_t height() const { return _h; }
38  size_t pixels() const { return _w * _h; }
39  size_t components() const { return _components;}
40 
41  const Component* buffer() const { return _buffer; }
42  Component* buffer() { return _buffer; }
43  Frame_Buffer * resize(int w,int h);
44 
45  protected:
46  size_t _w;
47  size_t _h;
49  size_t _components;
50 
51  Frame_Buffer * min_y(Frame_Buffer * fb,double first,double next,int h,int del);
52  Frame_Buffer * min_x(Frame_Buffer * fb,double first,double next,int w,int del);
53  Frame_Buffer * max_x(Frame_Buffer * fb,double first,double next,int w,int max);
54  Frame_Buffer * max_y(Frame_Buffer * fb,double first,double next,int w,int h,int max);
55 };
56 
57 #endif
Frame_Buffer::_buffer
Component * _buffer
Definition: Frame_Buffer.h:48
Frame_Buffer
Definition: Frame_Buffer.h:28
Frame_Buffer::pixels
size_t pixels() const
Definition: Frame_Buffer.h:38
Frame_Buffer::max_x
Frame_Buffer * max_x(Frame_Buffer *fb, double first, double next, int w, int max)
Definition: Frame_Buffer.cpp:105
Frame_Buffer::width
size_t width() const
Definition: Frame_Buffer.h:36
Frame_Buffer::buffer
const Component * buffer() const
Definition: Frame_Buffer.h:41
Frame_Buffer::min_y
Frame_Buffer * min_y(Frame_Buffer *fb, double first, double next, int h, int del)
Definition: Frame_Buffer.cpp:58
Frame_Buffer::max_y
Frame_Buffer * max_y(Frame_Buffer *fb, double first, double next, int w, int h, int max)
Definition: Frame_Buffer.cpp:132
Frame_Buffer::_w
size_t _w
Definition: Frame_Buffer.h:46
Frame_Buffer::min_x
Frame_Buffer * min_x(Frame_Buffer *fb, double first, double next, int w, int del)
Definition: Frame_Buffer.cpp:80
Frame_Buffer::Frame_Buffer
Frame_Buffer(size_t w, size_t h, size_t components)
Definition: Frame_Buffer.cpp:22
Frame_Buffer::components
size_t components() const
Definition: Frame_Buffer.h:39
Frame_Buffer::resize
Frame_Buffer * resize(int w, int h)
Definition: Frame_Buffer.cpp:33
Frame_Buffer::~Frame_Buffer
~Frame_Buffer()
Definition: Frame_Buffer.cpp:28
Frame_Buffer::buffer
Component * buffer()
Definition: Frame_Buffer.h:42
Frame_Buffer::_components
size_t _components
Definition: Frame_Buffer.h:49
Frame_Buffer::height
size_t height() const
Definition: Frame_Buffer.h:37
Frame_Buffer::_h
size_t _h
Definition: Frame_Buffer.h:47
Frame_Buffer::Component
unsigned char Component
Definition: Frame_Buffer.h:34