GUIDOLib  1.7.7
Guido Engine Internal Documentation
DeviceExporter.h
1 #ifndef __DeviceExporter__
2 #define __DeviceExporter__
3 
4 /*
5  GUIDO Library
6  Copyright (C) 2007 Grame
7 
8  This Source Code Form is subject to the terms of the Mozilla Public
9  License, v. 2.0. If a copy of the MPL was not distributed with this
10  file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 
12  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
13  research@grame.fr
14 
15 */
16 
17 //#include "DecoratorDevice.h"
18 #include "VGDevice.h"
19 #include "GUIDOExport.h"
20 
21 #ifdef WIN32
22 # if defined(_AFXDLL) // using mfc
23 # include <afx.h>
24 # else
25 # include <windows.h>// without mfc
26 # endif
27 #endif
28 
37 // --------------------------------------------------------------
38 class_export DeviceExporter //: public DecoratorDevice
39 {
40  protected:
41 
42  VGDevice* fDevice;
43  public:
44 
45 
47  enum VImgFormat
48  {
49  kImgFormatUnknown = 0, // unknown mode, use default
50  kImgFormatBMP, // Win32 32 bits bitmap
51  kImgFormatTIFF, // MacOs tiff format
52  kImgFormatPNG // png format
53  };
54 
55 
56  DeviceExporter(VGDevice * dev) { fDevice = dev; }
57  virtual ~DeviceExporter() { fDevice = 0; }
58 
59  // - Device data export service ----------------------------------------
60 
62  virtual bool ExportToFile( const char * inFilePath, VImgFormat inImgFormat );
63 
64  private:
65 
66 #ifdef WIN32
67  // - Win32 specific methods for bitmap management -------------------------
68  PBITMAPINFO WIN32_createBitmapInfoStruct( HWND hwnd, HBITMAP hBmp );
69  void WIN32_saveBitmapToBMPFile( HWND hwnd, LPCTSTR pszFile, PBITMAPINFO pbi, HBITMAP hBMP, HDC hDC );
70 #endif
71 
72 };
73 
74 #endif
VGDevice
Generic platform independant drawing device.
Definition: VGDevice.h:68

Guido Project Copyright © 2019 Grame-CNCM