PLplot
5.10.0
|
00001 // Copyright (C) 2005 Werner Smekal 00002 // 00003 // This file is part of PLplot. 00004 // 00005 // PLplot is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU Library General Public License as published 00007 // by the Free Software Foundation; either version 2 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // PLplot is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU Library General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU Library General Public License 00016 // along with PLplot; if not, write to the Free Software 00017 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 // 00019 00020 #if !defined ( WXPLPLOTSTREAM_H__INCLUDED_ ) 00021 #define WXPLPLOTSTREAM_H__INCLUDED_ 00022 00023 #include "plstream.h" 00024 00025 // forward declarations 00026 class wxImage; 00027 class wxDC; 00028 00029 // we define some macros, where the *name* of these depend on 00030 // if freetype is available - in the code we have checks 00031 // for the WX_TEMP_...._IS_ON macros (otherwise WX_TEMP_...._IS_OFF 00032 // is defined) 00033 #define WX_TEMP_PL_HAVE_FREETYPE_IS_ON 00034 00036 // wxPLPLOT_NONE: no option 00037 // wxPLPLOT_FREETYPE: use freetype library instead of Hershey fonts 00038 // wxPLPLOT_SMOOTHTEXT: antialiase font (if freetype library is used) 00039 // wxPLPLOT_BACKEND_DC: use the standard wxDC backend (always available) 00040 // wxPLPLOT_BACKEND_AGG: use the AGG backend (if available) 00041 // wxPLPLOT_BACKEND_GC: use the wxGraphicsContext backend (if available) 00042 // wxPLPLOT_DRAWTEXT: use wxWidgets routines to draw text 00043 // wxPLPLOT_USE_HERSHEY_SYMBOLS: use hershey symbols to draw symbols instead of font symbols 00044 // 00045 enum 00046 { 00047 wxPLPLOT_NONE = 0, 00048 #ifdef WX_TEMP_PL_HAVE_FREETYPE_IS_ON 00049 wxPLPLOT_FREETYPE = 1 << 0, 00050 wxPLPLOT_SMOOTH_TEXT = 1 << 1, 00051 #endif 00052 wxPLPLOT_BACKEND_DC = 1 << 2, 00053 wxPLPLOT_BACKEND_AGG = 1 << 3, 00054 wxPLPLOT_BACKEND_GC = 1 << 4, 00055 wxPLPLOT_DRAW_TEXT = 1 << 5, 00056 wxPLPLOT_USE_HERSHEY_SYMBOLS = 1 << 6 00057 }; 00058 00060 // to the plplot API. The documentation of this interface is described in 00061 // the PLplot manual, not here. 00062 // 00063 class PLDLLIMPEXP_WX wxPLplotstream : public plstream 00064 { 00065 public: 00066 wxPLplotstream(); 00067 wxPLplotstream( wxDC * dc, int width, int height, int style = wxPLPLOT_NONE ); 00068 void Create( wxDC *dc, int width, int height, int style ); 00069 ~wxPLplotstream(); 00070 //wxPLplotstream( wxImage *buffer, int width, int height, int style ); 00071 void set_stream(); 00072 void SetSize( int width, int height ); 00073 void RenewPlot(); 00074 void Update(); 00075 00076 private: 00077 void InitStream(); 00078 00079 private: 00080 wxDC * m_dc; 00081 wxImage* m_image; 00082 int m_width; 00083 int m_height; 00084 int m_style; 00085 int m_backend; 00086 }; 00087 00088 00089 #endif // !defined( WXPLPLOTSTREAM_H__INCLUDED_ )