Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00013 #ifndef _HIO_UTILITY_GDIOUTPUT_H
00014 #define _HIO_UTILITY_GDIOUTPUT_H
00015
00016 #include "HTools.h"
00017 #include "HIOManager.h"
00018 #include "HMFCGlobals.h"
00019 #include "utf_utils.h"
00020
00021
00022
00030 #define DEBUG_FORCE_FULL_COLOR 0x00000010
00031
00036 #define DEBUG_NO_WINDOWS_HOOK 0x00000040
00037
00043 #define DEBUG_SFB_COPY_TO_CLIPBOARD 0x00004000
00044
00049 #define DEBUG_NO_RASTERS_IN_PRINTING 0x00020000
00050
00055 #define DEBUG_PRINTING_MODE 0x00040000
00056
00062 #define DEBUG_PRINT_NOT_FRAMEBUFFER_MODE 0x00020000
00063
00064
00069 #define DEBUG_PRINT_NOT_RASTER_REDUCTION 0x00200000
00070
00075 #define DEBUG_FORCE_SOFTWARE 0x01000000
00076
00082 #define DEBUG_NO_PAINTERS_PANELLING 0x00000008
00083
00088 class GDIExportInformation : public HOutputHandlerOptions {
00089 public:
00090
00091
00092
00093 GDIExportInformation()
00094 : HOutputHandlerOptions(),
00095 bForceGrayscale(m_ForceGrayscale),
00096 bConserveMemory(m_bConserveMemory),
00097 bUseWindowColor(m_bUseWindowColor),
00098 Height(m_Window_Height),
00099 Width(m_Window_Width),
00100 image_dpi(m_Image_Dpi)
00101 {
00102 clipBoard = false;
00103 rasterOutput = false;
00104 windowID = 0;
00105 deviceContext = attribDC = 0;
00106 }
00107
00108 HDC deviceContext;
00109 HDC attribDC;
00110 bool rasterOutput;
00111 bool clipBoard;
00112 void* windowID;
00113
00114 bool & bForceGrayscale;
00115 bool & bConserveMemory;
00116 bool & bUseWindowColor;
00117 float & Height;
00118 float & Width;
00119 int & image_dpi;
00120 };
00121
00122 typedef GDIExportInformation GDIExportInfo;
00123
00125
00145 #ifdef SWIG
00146 class MVO_API HIOUtilityGDIOutput : public HOutputHandler
00147 #else
00148 class HMFC_API HIOUtilityGDIOutput : public HOutputHandler
00149 #endif
00150 {
00151
00152 public:
00153
00154 HIOUtilityGDIOutput() {
00155 SetOutputOps(HOutputOpFileOutputByKey);
00156 };
00157 virtual ~HIOUtilityGDIOutput() {;}
00158
00160 void RegisterOutputHandlerTypes() {
00161 HIORegisterOutputType("emf", this);
00162 }
00163
00164 const char * GetOutputName() { return "HIOUtilityGDIOutput"; }
00165
00169 const char * GetOutputTypesString() {return "emf";}
00170
00177 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleModel;}
00178
00188 HFileOutputResult FileOutputByKey(const char * FileName, HC_KEY key, HOutputHandlerOptions * options){
00189 return FileOutputByKey(H_WCS(FileName).encodedText(), key, options);
00190 }
00191 HFileOutputResult FileOutputByKey(unsigned short const * FileName, HC_KEY key, HOutputHandlerOptions * options){
00192 H_UTF16 utf16;
00193 utf16.encodedText((utf16_char const*) FileName);
00194 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
00195 }
00196 HFileOutputResult FileOutputByKey(const __wchar_t * FileName, HC_KEY key, HOutputHandlerOptions * options);
00197
00207 HFileOutputResult DoClipBoard(const wchar_t * FileName, HC_KEY key, GDIExportInformation * options);
00208
00218 HFileOutputResult DoPrinter(const wchar_t * FileName, HC_KEY key, GDIExportInformation * options);
00219
00221 HFileOutputResult FileOutputFromImageKey(const char * FileName, HC_KEY key, HOutputHandlerOptions * options){
00222 UNREFERENCED(FileName);
00223 UNREFERENCED(key);
00224 UNREFERENCED(options);
00225 return OutputNotHandled;
00226 }
00227 HFileOutputResult FileOutputFromImageKey(unsigned short const * FileName, HC_KEY key, HOutputHandlerOptions * options){
00228 UNREFERENCED(FileName);
00229 UNREFERENCED(key);
00230 UNREFERENCED(options);
00231 return OutputNotHandled;
00232 }
00233 HFileOutputResult FileOutputFromImageKey(const __wchar_t * FileName, HC_KEY key, HOutputHandlerOptions * options){
00234 UNREFERENCED(FileName);
00235 UNREFERENCED(key);
00236 UNREFERENCED(options);
00237 return OutputNotHandled;
00238 }
00239
00240 private:
00241
00242 };
00243
00244
00245
00246 #endif
00247
00248
00249