| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_SRC_FXGE_WIN32_WIN32_INT_H_ | 7 #ifndef CORE_SRC_FXGE_WIN32_WIN32_INT_H_ |
| 8 #define CORE_SRC_FXGE_WIN32_WIN32_INT_H_ | 8 #define CORE_SRC_FXGE_WIN32_WIN32_INT_H_ |
| 9 | 9 |
| 10 #include "core/include/fxge/fx_ge.h" | 10 #include "core/include/fxge/fx_ge.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 FX_BOOL StretchDIBits(HDC hDC, | 29 FX_BOOL StretchDIBits(HDC hDC, |
| 30 const CFX_DIBitmap* pBitmap, | 30 const CFX_DIBitmap* pBitmap, |
| 31 int dest_left, | 31 int dest_left, |
| 32 int dest_top, | 32 int dest_top, |
| 33 int dest_width, | 33 int dest_width, |
| 34 int dest_height, | 34 int dest_height, |
| 35 const FX_RECT* pClipRect, | 35 const FX_RECT* pClipRect, |
| 36 int flags); | 36 int flags); |
| 37 FX_BOOL DrawPath(HDC hDC, | 37 FX_BOOL DrawPath(HDC hDC, |
| 38 const CFX_PathData* pPathData, | 38 const CFX_PathData* pPathData, |
| 39 const CFX_AffineMatrix* pObject2Device, | 39 const CFX_Matrix* pObject2Device, |
| 40 const CFX_GraphStateData* pGraphState, | 40 const CFX_GraphStateData* pGraphState, |
| 41 FX_DWORD fill_argb, | 41 FX_DWORD fill_argb, |
| 42 FX_DWORD stroke_argb, | 42 FX_DWORD stroke_argb, |
| 43 int fill_mode); | 43 int fill_mode); |
| 44 | 44 |
| 45 void* LoadMemFont(uint8_t* pData, FX_DWORD size); | 45 void* LoadMemFont(uint8_t* pData, FX_DWORD size); |
| 46 void DeleteMemFont(void* pFontCollection); | 46 void DeleteMemFont(void* pFontCollection); |
| 47 FX_BOOL GdipCreateFromImage(void* bitmap, void** graphics); | 47 FX_BOOL GdipCreateFromImage(void* bitmap, void** graphics); |
| 48 void GdipDeleteGraphics(void* graphics); | 48 void GdipDeleteGraphics(void* graphics); |
| 49 void GdipSetTextRenderingHint(void* graphics, int mode); | 49 void GdipSetTextRenderingHint(void* graphics, int mode); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // IFX_RenderDeviceDriver | 110 // IFX_RenderDeviceDriver |
| 111 int GetDeviceCaps(int caps_id) override; | 111 int GetDeviceCaps(int caps_id) override; |
| 112 void SaveState() override { SaveDC(m_hDC); } | 112 void SaveState() override { SaveDC(m_hDC); } |
| 113 void RestoreState(FX_BOOL bKeepSaved = FALSE) override { | 113 void RestoreState(FX_BOOL bKeepSaved = FALSE) override { |
| 114 RestoreDC(m_hDC, -1); | 114 RestoreDC(m_hDC, -1); |
| 115 if (bKeepSaved) { | 115 if (bKeepSaved) { |
| 116 SaveDC(m_hDC); | 116 SaveDC(m_hDC); |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, | 119 FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, |
| 120 const CFX_AffineMatrix* pObject2Device, | 120 const CFX_Matrix* pObject2Device, |
| 121 int fill_mode) override; | 121 int fill_mode) override; |
| 122 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, | 122 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, |
| 123 const CFX_AffineMatrix* pObject2Device, | 123 const CFX_Matrix* pObject2Device, |
| 124 const CFX_GraphStateData* pGraphState) override; | 124 const CFX_GraphStateData* pGraphState) override; |
| 125 FX_BOOL DrawPath(const CFX_PathData* pPathData, | 125 FX_BOOL DrawPath(const CFX_PathData* pPathData, |
| 126 const CFX_AffineMatrix* pObject2Device, | 126 const CFX_Matrix* pObject2Device, |
| 127 const CFX_GraphStateData* pGraphState, | 127 const CFX_GraphStateData* pGraphState, |
| 128 FX_DWORD fill_color, | 128 FX_DWORD fill_color, |
| 129 FX_DWORD stroke_color, | 129 FX_DWORD stroke_color, |
| 130 int fill_mode, | 130 int fill_mode, |
| 131 int alpha_flag, | 131 int alpha_flag, |
| 132 void* pIccTransform, | 132 void* pIccTransform, |
| 133 int blend_type) override; | 133 int blend_type) override; |
| 134 FX_BOOL FillRect(const FX_RECT* pRect, | 134 FX_BOOL FillRect(const FX_RECT* pRect, |
| 135 FX_DWORD fill_color, | 135 FX_DWORD fill_color, |
| 136 int alpha_flag, | 136 int alpha_flag, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 int dest_width, | 205 int dest_width, |
| 206 int dest_height, | 206 int dest_height, |
| 207 const FX_RECT* pClipRect, | 207 const FX_RECT* pClipRect, |
| 208 FX_DWORD flags, | 208 FX_DWORD flags, |
| 209 int alpha_flag, | 209 int alpha_flag, |
| 210 void* pIccTransform, | 210 void* pIccTransform, |
| 211 int blend_type); | 211 int blend_type); |
| 212 virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, | 212 virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, |
| 213 int bitmap_alpha, | 213 int bitmap_alpha, |
| 214 FX_DWORD color, | 214 FX_DWORD color, |
| 215 const CFX_AffineMatrix* pMatrix, | 215 const CFX_Matrix* pMatrix, |
| 216 FX_DWORD render_flags, | 216 FX_DWORD render_flags, |
| 217 void*& handle, | 217 void*& handle, |
| 218 int alpha_flag, | 218 int alpha_flag, |
| 219 void* pIccTransform, | 219 void* pIccTransform, |
| 220 int blend_type) { | 220 int blend_type) { |
| 221 return FALSE; | 221 return FALSE; |
| 222 } | 222 } |
| 223 FX_BOOL UseFoxitStretchEngine(const CFX_DIBSource* pSource, | 223 FX_BOOL UseFoxitStretchEngine(const CFX_DIBSource* pSource, |
| 224 FX_DWORD color, | 224 FX_DWORD color, |
| 225 int dest_left, | 225 int dest_left, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 253 int dest_width, | 253 int dest_width, |
| 254 int dest_height, | 254 int dest_height, |
| 255 const FX_RECT* pClipRect, | 255 const FX_RECT* pClipRect, |
| 256 FX_DWORD flags, | 256 FX_DWORD flags, |
| 257 int alpha_flag, | 257 int alpha_flag, |
| 258 void* pIccTransform, | 258 void* pIccTransform, |
| 259 int blend_type); | 259 int blend_type); |
| 260 virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, | 260 virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, |
| 261 int bitmap_alpha, | 261 int bitmap_alpha, |
| 262 FX_DWORD color, | 262 FX_DWORD color, |
| 263 const CFX_AffineMatrix* pMatrix, | 263 const CFX_Matrix* pMatrix, |
| 264 FX_DWORD render_flags, | 264 FX_DWORD render_flags, |
| 265 void*& handle, | 265 void*& handle, |
| 266 int alpha_flag, | 266 int alpha_flag, |
| 267 void* pIccTransform, | 267 void* pIccTransform, |
| 268 int blend_type); | 268 int blend_type); |
| 269 int m_HorzSize, m_VertSize; | 269 int m_HorzSize, m_VertSize; |
| 270 FX_BOOL m_bSupportROP; | 270 FX_BOOL m_bSupportROP; |
| 271 }; | 271 }; |
| 272 | 272 |
| 273 class CPSOutput : public IFX_PSOutput { | 273 class CPSOutput : public IFX_PSOutput { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 293 | 293 |
| 294 protected: | 294 protected: |
| 295 // IFX_RenderDeviceDriver | 295 // IFX_RenderDeviceDriver |
| 296 int GetDeviceCaps(int caps_id); | 296 int GetDeviceCaps(int caps_id); |
| 297 FX_BOOL IsPSPrintDriver() override { return TRUE; } | 297 FX_BOOL IsPSPrintDriver() override { return TRUE; } |
| 298 FX_BOOL StartRendering() override; | 298 FX_BOOL StartRendering() override; |
| 299 void EndRendering() override; | 299 void EndRendering() override; |
| 300 void SaveState() override; | 300 void SaveState() override; |
| 301 void RestoreState(FX_BOOL bKeepSaved = FALSE) override; | 301 void RestoreState(FX_BOOL bKeepSaved = FALSE) override; |
| 302 FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, | 302 FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, |
| 303 const CFX_AffineMatrix* pObject2Device, | 303 const CFX_Matrix* pObject2Device, |
| 304 int fill_mode) override; | 304 int fill_mode) override; |
| 305 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, | 305 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, |
| 306 const CFX_AffineMatrix* pObject2Device, | 306 const CFX_Matrix* pObject2Device, |
| 307 const CFX_GraphStateData* pGraphState) override; | 307 const CFX_GraphStateData* pGraphState) override; |
| 308 FX_BOOL DrawPath(const CFX_PathData* pPathData, | 308 FX_BOOL DrawPath(const CFX_PathData* pPathData, |
| 309 const CFX_AffineMatrix* pObject2Device, | 309 const CFX_Matrix* pObject2Device, |
| 310 const CFX_GraphStateData* pGraphState, | 310 const CFX_GraphStateData* pGraphState, |
| 311 FX_DWORD fill_color, | 311 FX_DWORD fill_color, |
| 312 FX_DWORD stroke_color, | 312 FX_DWORD stroke_color, |
| 313 int fill_mode, | 313 int fill_mode, |
| 314 int alpha_flag, | 314 int alpha_flag, |
| 315 void* pIccTransform, | 315 void* pIccTransform, |
| 316 int blend_type) override; | 316 int blend_type) override; |
| 317 FX_BOOL GetClipBox(FX_RECT* pRect) override; | 317 FX_BOOL GetClipBox(FX_RECT* pRect) override; |
| 318 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | 318 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, |
| 319 FX_DWORD color, | 319 FX_DWORD color, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 330 int dest_width, | 330 int dest_width, |
| 331 int dest_height, | 331 int dest_height, |
| 332 const FX_RECT* pClipRect, | 332 const FX_RECT* pClipRect, |
| 333 FX_DWORD flags, | 333 FX_DWORD flags, |
| 334 int alpha_flag, | 334 int alpha_flag, |
| 335 void* pIccTransform, | 335 void* pIccTransform, |
| 336 int blend_type) override; | 336 int blend_type) override; |
| 337 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, | 337 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, |
| 338 int bitmap_alpha, | 338 int bitmap_alpha, |
| 339 FX_DWORD color, | 339 FX_DWORD color, |
| 340 const CFX_AffineMatrix* pMatrix, | 340 const CFX_Matrix* pMatrix, |
| 341 FX_DWORD render_flags, | 341 FX_DWORD render_flags, |
| 342 void*& handle, | 342 void*& handle, |
| 343 int alpha_flag, | 343 int alpha_flag, |
| 344 void* pIccTransform, | 344 void* pIccTransform, |
| 345 int blend_type) override; | 345 int blend_type) override; |
| 346 FX_BOOL DrawDeviceText(int nChars, | 346 FX_BOOL DrawDeviceText(int nChars, |
| 347 const FXTEXT_CHARPOS* pCharPos, | 347 const FXTEXT_CHARPOS* pCharPos, |
| 348 CFX_Font* pFont, | 348 CFX_Font* pFont, |
| 349 CFX_FontCache* pCache, | 349 CFX_FontCache* pCache, |
| 350 const CFX_AffineMatrix* pObject2Device, | 350 const CFX_Matrix* pObject2Device, |
| 351 FX_FLOAT font_size, | 351 FX_FLOAT font_size, |
| 352 FX_DWORD color, | 352 FX_DWORD color, |
| 353 int alpha_flag, | 353 int alpha_flag, |
| 354 void* pIccTransform) override; | 354 void* pIccTransform) override; |
| 355 void* GetPlatformSurface() override { return (void*)m_hDC; } | 355 void* GetPlatformSurface() override { return (void*)m_hDC; } |
| 356 | 356 |
| 357 HDC m_hDC; | 357 HDC m_hDC; |
| 358 FX_BOOL m_bCmykOutput; | 358 FX_BOOL m_bCmykOutput; |
| 359 int m_Width, m_Height, m_nBitsPerPixel; | 359 int m_Width, m_Height, m_nBitsPerPixel; |
| 360 int m_HorzSize, m_VertSize; | 360 int m_HorzSize, m_VertSize; |
| 361 CPSOutput* m_pPSOutput; | 361 CPSOutput* m_pPSOutput; |
| 362 CFX_PSRenderer m_PSRenderer; | 362 CFX_PSRenderer m_PSRenderer; |
| 363 }; | 363 }; |
| 364 void _Color2Argb(FX_ARGB& argb, | 364 void _Color2Argb(FX_ARGB& argb, |
| 365 FX_DWORD color, | 365 FX_DWORD color, |
| 366 int alpha_flag, | 366 int alpha_flag, |
| 367 void* pIccTransform); | 367 void* pIccTransform); |
| 368 | 368 |
| 369 #endif // CORE_SRC_FXGE_WIN32_WIN32_INT_H_ | 369 #endif // CORE_SRC_FXGE_WIN32_WIN32_INT_H_ |
| OLD | NEW |