PLplot  5.11.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
wxPLplotstream.h
Go to the documentation of this file.
1 // Copyright (C) 2015 Phil Rosenberg
2 // Copyright (C) 2005 Werner Smekal
3 //
4 // This file is part of PLplot.
5 //
6 // PLplot is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU Library General Public License as published
8 // by the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // PLplot is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU Library General Public License for more details.
15 //
16 // You should have received a copy of the GNU Library General Public License
17 // along with PLplot; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 //
20 
21 #if !defined ( WXPLPLOTSTREAM_H__INCLUDED_ )
22 #define WXPLPLOTSTREAM_H__INCLUDED_
23 
24 #include "plstream.h"
25 
26 // forward declarations
27 class wxImage;
28 class wxDC;
29 
31 // wxPLPLOT_NONE: no option
32 // wxPLPLOT_DRAWTEXT: use wxWidgets routines to draw text
33 // wxPLPLOT_USE_HERSHEY_SYMBOLS: use hershey symbols to draw symbols instead of font symbols
34 //
35 enum
36 {
40 };
41 
43 // to the plplot API. The documentation of this interface is described in
44 // the PLplot manual, not here.
45 //
47 {
48 public:
49  wxPLplotstream();
50  wxPLplotstream( wxDC * dc, int width, int height, int style = wxPLPLOT_NONE );
51  void Create( wxDC *dc, int width, int height, int style );
52  ~wxPLplotstream();
53  //wxPLplotstream( wxImage *buffer, int width, int height, int style );
54  void set_stream();
55  void SetSize( int width, int height );
56  void RenewPlot();
57  void SetDC( wxDC *dc );
58  void ImportBuffer( void *buffer, size_t size );
59  void SetFixedAspectRatio( bool fixed );
60  bool IsValid();
61 
62 private:
63  void InitStream();
64 
65 private:
66  int m_width;
67  int m_height;
68  int m_style;
69  bool m_created;
70 };
71 
72 
73 #endif // !defined( WXPLPLOTSTREAM_H__INCLUDED_ )