PLplot 5.15.0
Loading...
Searching...
No Matches
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#include "wxPLplot_nanosec.h"
26
27// forward declarations
28class wxImage;
29class wxDC;
30
32// wxPLPLOT_NONE: no option
33// wxPLPLOT_DRAWTEXT: use wxWidgets routines to draw text
34// wxPLPLOT_USE_HERSHEY_SYMBOLS: use hershey symbols to draw symbols instead of font symbols
35//
36enum
37{
41};
42
44// to the plplot API. The documentation of this interface is described in
45// the PLplot manual, not here.
46//
48{
49public:
51 wxPLplotstream( wxDC * dc, int width, int height, int style = wxPLPLOT_NONE );
52 void Create( wxDC *dc, int width, int height, int style );
54 //wxPLplotstream( wxImage *buffer, int width, int height, int style );
55 void set_stream();
56 void SetSize( int width, int height );
57 void RenewPlot();
58 void SetDC( wxDC *dc );
59 void ImportBuffer( void *buffer, size_t size );
60 void AppendBuffer( void *buffer, size_t size );
61 void SetFixedAspectRatio( bool fixed );
62 bool IsValid();
63
64private:
65 void InitStream();
66
67private:
68 int m_width;
70 int m_style;
72};
73
74
75#endif // !defined( WXPLPLOTSTREAM_H__INCLUDED_ )
virtual void set_stream(void)
Definition plstream.h:133
void width(PLFLT width)
Definition plstream.cc:2244
plstream(const plstream &)
int m_width
Width of dc/plot area.
int m_style
style of this plot
void SetDC(wxDC *dc)
Set a new dc to write to.
void AppendBuffer(void *buffer, size_t size)
Append a buffer of plplot commands.
void RenewPlot()
Redo plot and update dc.
wxPLplotstream()
Constructor.
int m_height
Height of dc/plot area.
void SetFixedAspectRatio(bool fixed)
Set Fixed aspect ratio of the plot.
void ImportBuffer(void *buffer, size_t size)
Import a buffer of plplot commands.
void SetSize(int width, int height)
Set new size of plot area.
void Create(wxDC *dc, int width, int height, int style)
Called from the constructor or can be called by the user if the default constructor is used.
#define PLDLLIMPEXP_WX
Definition pldll.h:109
static PLINT * buffer
Definition plfill.c:74
@ wxPLPLOT_DRAW_TEXT
@ wxPLPLOT_NONE
@ wxPLPLOT_USE_HERSHEY_SYMBOLS