VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gvdemo.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2017 Graeme Walker
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 // ===
17 ///
18 /// \file gvdemo.h
19 ///
20 
21 #ifndef GV_DEMO__H
22 #define GV_DEMO__H
23 
24 #include "gdef.h"
25 #include "gvimagegenerator.h"
26 #include "gvtimezone.h"
27 
28 namespace Gv
29 {
30  class Demo ;
31  class DemoImp ;
32 }
33 
34 /// \class Gv::Demo
35 /// An image generator class for a demo animation.
36 ///
37 class Gv::Demo : public ImageGenerator
38 {
39 public:
40  Demo( int dx , int dy , const std::string & dev_config , Gv::Timezone ) ;
41  ///< Constructor.
42 
43  virtual ~Demo() ;
44  ///< Destructor.
45 
46  virtual bool init() override ;
47  ///< Override from Gv::ImageGenerator.
48 
49  virtual void fillBuffer( CaptureBuffer & , const CaptureBufferScale & ) override ;
50  ///< Override from Gv::ImageGenerator.
51 
52 private:
53  Demo( const Demo & ) ;
54  void operator=( const Demo & ) ;
55  void drawScene( CaptureBuffer & , const CaptureBufferScale & ) ;
56  void drawItem( CaptureBuffer & , const CaptureBufferScale & , const char * ,
57  size_t , size_t , int , int , bool first , size_t = 0U ) ;
58 
59 private:
60  DemoImp * m_imp ;
61 } ;
62 
63 #endif
virtual bool init() override
Override from Gv::ImageGenerator.
Definition: gvdemo.cpp:90
virtual ~Demo()
Destructor.
Definition: gvdemo.cpp:85
A representation of a timezone.
Definition: gvtimezone.h:35
An abstract interface for filling a YUYV capture buffer with a generated image.
An image generator class for a demo animation.
Definition: gvdemo.h:37
A video-capture buffer class to hold image data, with overloaded constructors for the various V4l i/o...
A pimple-pattern implementation class for Gv::Demo.
Definition: gvdemo.cpp:35
Demo(int dx, int dy, const std::string &dev_config, Gv::Timezone)
Constructor.
Definition: gvdemo.cpp:80
A structure holding capture buffer dimensions.
virtual void fillBuffer(CaptureBuffer &, const CaptureBufferScale &) override
Override from Gv::ImageGenerator.
Definition: gvdemo.cpp:95