Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00016 #ifndef _HIO_UTILITY_GDIOUTPUT_H
00017 #define _HIO_UTILITY_GDIOUTPUT_H
00018
00019 #include "HTools.h"
00020 #include "HIOManager.h"
00021 #include "HMFCGlobals.h"
00022 #include "utf_utils.h"
00023
00024
00025
00033 #define DEBUG_FORCE_FULL_COLOR 0x00000010
00034
00039 #define DEBUG_NO_WINDOWS_HOOK 0x00000040
00040
00046 #define DEBUG_SFB_COPY_TO_CLIPBOARD 0x00004000
00047
00052 #define DEBUG_NO_RASTERS_IN_PRINTING 0x00020000
00053
00058 #define DEBUG_PRINTING_MODE 0x00040000
00059
00065 #define DEBUG_PRINT_NOT_FRAMEBUFFER_MODE 0x00020000
00066
00067
00072 #define DEBUG_PRINT_NOT_RASTER_REDUCTION 0x00200000
00073
00078 #define DEBUG_FORCE_SOFTWARE 0x01000000
00079
00085 #define DEBUG_NO_PAINTERS_PANELLING 0x00000008
00086
00091 class GDIExportInformation : public HOutputHandlerOptions {
00092 public:
00093
00094
00095
00096 GDIExportInformation()
00097 : HOutputHandlerOptions(),
00098 bForceGrayscale(m_ForceGrayscale),
00099 bConserveMemory(m_bConserveMemory),
00100 bUseWindowColor(m_bUseWindowColor),
00101 Height(m_Window_Height),
00102 Width(m_Window_Width),
00103 image_dpi(m_Image_Dpi)
00104 {
00105 clipBoard = false;
00106 rasterOutput = false;
00107 windowID = 0;
00108 deviceContext = attribDC = 0;
00109 }
00110
00111 HDC deviceContext;
00112 HDC attribDC;
00113 bool rasterOutput;
00114 bool clipBoard;
00115 void* windowID;
00116
00117 bool & bForceGrayscale;
00118 bool & bConserveMemory;
00119 bool & bUseWindowColor;
00120 float & Height;
00121 float & Width;
00122 int & image_dpi;
00123 };
00124
00125 typedef GDIExportInformation GDIExportInfo;
00126
00128
00148 #ifdef SWIG
00149 class MVO_API HIOUtilityGDIOutput : public HOutputHandler
00150 #else
00151 class HMFC_API HIOUtilityGDIOutput : public HOutputHandler
00152 #endif
00153 {
00154
00155 public:
00156
00157 HIOUtilityGDIOutput() {
00158 SetOutputOps(HOutputOpFileOutputByKey);
00159 };
00160 virtual ~HIOUtilityGDIOutput() {;}
00161
00163 void RegisterOutputHandlerTypes() {
00164 HIORegisterOutputType("emf", this);
00165 }
00166
00167 const char * GetOutputName() { return "HIOUtilityGDIOutput"; }
00168
00172 const char * GetOutputTypesString() {return "emf";}
00173
00180 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleModel;}
00181
00191 HFileOutputResult FileOutputByKey(const char * FileName, HC_KEY key, HOutputHandlerOptions * options){
00192 return FileOutputByKey(H_WCS(FileName).encodedText(), key, options);
00193 }
00194 HFileOutputResult FileOutputByKey(unsigned short const * FileName, HC_KEY key, HOutputHandlerOptions * options){
00195 H_UTF16 utf16;
00196 utf16.encodedText((utf16_char const*) FileName);
00197 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
00198 }
00199 HFileOutputResult FileOutputByKey(const __wchar_t * FileName, HC_KEY key, HOutputHandlerOptions * options);
00200
00210 HFileOutputResult DoClipBoard(const wchar_t * FileName, HC_KEY key, GDIExportInformation * options);
00211
00221 HFileOutputResult DoPrinter(const wchar_t * FileName, HC_KEY key, GDIExportInformation * options);
00222
00224 HFileOutputResult FileOutputFromImageKey(const char * FileName, HC_KEY key, HOutputHandlerOptions * options){
00225 UNREFERENCED(FileName);
00226 UNREFERENCED(key);
00227 UNREFERENCED(options);
00228 return OutputNotHandled;
00229 }
00230 HFileOutputResult FileOutputFromImageKey(unsigned short const * FileName, HC_KEY key, HOutputHandlerOptions * options){
00231 UNREFERENCED(FileName);
00232 UNREFERENCED(key);
00233 UNREFERENCED(options);
00234 return OutputNotHandled;
00235 }
00236 HFileOutputResult FileOutputFromImageKey(const __wchar_t * FileName, HC_KEY key, HOutputHandlerOptions * options){
00237 UNREFERENCED(FileName);
00238 UNREFERENCED(key);
00239 UNREFERENCED(options);
00240 return OutputNotHandled;
00241 }
00242
00243 private:
00244
00245 };
00246
00247
00248
00249 #endif
00250
00251
00252