Fawkes API  Fawkes Development Version
scaler.h
1 
2 /***************************************************************************
3  * scaler.h - Scaler interface
4  *
5  * Generated: Tue May 16 14:52:58 2006 (Automatica 2006)
6  * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __FIREVISION_FVUTILS_SCALERS_SCALER_H_
25 #define __FIREVISION_FVUTILS_SCALERS_SCALER_H_
26 
27 namespace firevision {
28 #if 0 /* just to make Emacs auto-indent happy */
29 }
30 #endif
31 
32 class Scaler {
33 
34  public:
35  virtual ~Scaler();
36 
37  virtual void set_scale_factor(float factor) = 0;
38  virtual void set_original_dimensions(unsigned int width,
39  unsigned int height) = 0;
40  virtual void set_scaled_dimensions(unsigned int width,
41  unsigned int height) = 0;
42  virtual void set_original_buffer(unsigned char *buffer) = 0;
43  virtual void set_scaled_buffer(unsigned char *buffer) = 0;
44  virtual void scale() = 0;
45  virtual unsigned int needed_scaled_width() = 0;
46  virtual unsigned int needed_scaled_height() = 0;
47  virtual float get_scale_factor() = 0;
48 
49 };
50 
51 } // end namespace firevision
52 
53 #endif
virtual float get_scale_factor()=0
Returns the scale factor.
virtual unsigned int needed_scaled_height()=0
Minimum needed height of scaled image depending on factor and original image height.
virtual void set_scaled_buffer(unsigned char *buffer)=0
Set scaled image buffer.
virtual void set_scale_factor(float factor)=0
Set scale factor.
virtual void scale()=0
Scale image.
Image scaler interface.
Definition: scaler.h:32
virtual void set_scaled_dimensions(unsigned int width, unsigned int height)=0
Set dimenins of scaled image buffer.
virtual void set_original_dimensions(unsigned int width, unsigned int height)=0
Set original image dimensions.
virtual ~Scaler()
Virtual empty destructor.
Definition: scaler.cpp:75
virtual void set_original_buffer(unsigned char *buffer)=0
Set original image buffer.
virtual unsigned int needed_scaled_width()=0
Minimum needed width of scaled image depending on factor and original image width.