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_FXGE_INCLUDE_FX_GE_H_ | 7 #ifndef CORE_FXGE_INCLUDE_FX_GE_H_ |
8 #define CORE_FXGE_INCLUDE_FX_GE_H_ | 8 #define CORE_FXGE_INCLUDE_FX_GE_H_ |
9 | 9 |
10 #include "core/fxge/include/fx_dib.h" | 10 #include "core/fxge/include/fx_dib.h" |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 | 417 |
418 protected: | 418 protected: |
419 bool m_bOwnedBitmap; | 419 bool m_bOwnedBitmap; |
420 }; | 420 }; |
421 | 421 |
422 class IFX_RenderDeviceDriver { | 422 class IFX_RenderDeviceDriver { |
423 public: | 423 public: |
424 static IFX_RenderDeviceDriver* CreateFxgeDriver( | 424 static IFX_RenderDeviceDriver* CreateFxgeDriver( |
425 CFX_DIBitmap* pBitmap, | 425 CFX_DIBitmap* pBitmap, |
426 FX_BOOL bRgbByteOrder = FALSE, | 426 FX_BOOL bRgbByteOrder = FALSE, |
427 CFX_DIBitmap* pOriDevice = NULL, | 427 CFX_DIBitmap* pOriDevice = nullptr, |
428 FX_BOOL bGroupKnockout = FALSE); | 428 FX_BOOL bGroupKnockout = FALSE); |
429 | 429 |
430 virtual ~IFX_RenderDeviceDriver() {} | 430 virtual ~IFX_RenderDeviceDriver() {} |
431 | 431 |
432 virtual int GetDeviceCaps(int caps_id) = 0; | 432 virtual int GetDeviceCaps(int caps_id) = 0; |
433 | 433 |
434 virtual CFX_Matrix GetCTM() const { return CFX_Matrix(); } | 434 virtual CFX_Matrix GetCTM() const { return CFX_Matrix(); } |
435 | 435 |
436 virtual FX_BOOL StartRendering() { return TRUE; } | 436 virtual FX_BOOL StartRendering() { return TRUE; } |
437 | 437 |
(...skipping 13 matching lines...) Expand all Loading... |
451 return FALSE; | 451 return FALSE; |
452 } | 452 } |
453 | 453 |
454 virtual FX_BOOL DrawPath(const CFX_PathData* pPathData, | 454 virtual FX_BOOL DrawPath(const CFX_PathData* pPathData, |
455 const CFX_Matrix* pObject2Device, | 455 const CFX_Matrix* pObject2Device, |
456 const CFX_GraphStateData* pGraphState, | 456 const CFX_GraphStateData* pGraphState, |
457 uint32_t fill_color, | 457 uint32_t fill_color, |
458 uint32_t stroke_color, | 458 uint32_t stroke_color, |
459 int fill_mode, | 459 int fill_mode, |
460 int alpha_flag = 0, | 460 int alpha_flag = 0, |
461 void* pIccTransform = NULL, | 461 void* pIccTransform = nullptr, |
462 int blend_type = FXDIB_BLEND_NORMAL) = 0; | 462 int blend_type = FXDIB_BLEND_NORMAL) = 0; |
463 | 463 |
464 virtual FX_BOOL SetPixel(int x, | 464 virtual FX_BOOL SetPixel(int x, |
465 int y, | 465 int y, |
466 uint32_t color, | 466 uint32_t color, |
467 int alpha_flag = 0, | 467 int alpha_flag = 0, |
468 void* pIccTransform = NULL) { | 468 void* pIccTransform = nullptr) { |
469 return FALSE; | 469 return FALSE; |
470 } | 470 } |
471 | 471 |
472 virtual FX_BOOL FillRect(const FX_RECT* pRect, | 472 virtual FX_BOOL FillRect(const FX_RECT* pRect, |
473 uint32_t fill_color, | 473 uint32_t fill_color, |
474 int alpha_flag = 0, | 474 int alpha_flag = 0, |
475 void* pIccTransform = NULL, | 475 void* pIccTransform = nullptr, |
476 int blend_type = FXDIB_BLEND_NORMAL) { | 476 int blend_type = FXDIB_BLEND_NORMAL) { |
477 return FALSE; | 477 return FALSE; |
478 } | 478 } |
479 | 479 |
480 virtual FX_BOOL DrawCosmeticLine(FX_FLOAT x1, | 480 virtual FX_BOOL DrawCosmeticLine(FX_FLOAT x1, |
481 FX_FLOAT y1, | 481 FX_FLOAT y1, |
482 FX_FLOAT x2, | 482 FX_FLOAT x2, |
483 FX_FLOAT y2, | 483 FX_FLOAT y2, |
484 uint32_t color, | 484 uint32_t color, |
485 int alpha_flag = 0, | 485 int alpha_flag = 0, |
486 void* pIccTransform = NULL, | 486 void* pIccTransform = nullptr, |
487 int blend_type = FXDIB_BLEND_NORMAL) { | 487 int blend_type = FXDIB_BLEND_NORMAL) { |
488 return FALSE; | 488 return FALSE; |
489 } | 489 } |
490 | 490 |
491 virtual FX_BOOL GetClipBox(FX_RECT* pRect) = 0; | 491 virtual FX_BOOL GetClipBox(FX_RECT* pRect) = 0; |
492 | 492 |
493 virtual FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, | 493 virtual FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, |
494 int left, | 494 int left, |
495 int top, | 495 int top, |
496 void* pIccTransform = NULL, | 496 void* pIccTransform = nullptr, |
497 FX_BOOL bDEdge = FALSE) { | 497 FX_BOOL bDEdge = FALSE) { |
498 return FALSE; | 498 return FALSE; |
499 } | 499 } |
500 virtual CFX_DIBitmap* GetBackDrop() { return NULL; } | 500 virtual CFX_DIBitmap* GetBackDrop() { return nullptr; } |
501 | 501 |
502 virtual FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | 502 virtual FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, |
503 uint32_t color, | 503 uint32_t color, |
504 const FX_RECT* pSrcRect, | 504 const FX_RECT* pSrcRect, |
505 int dest_left, | 505 int dest_left, |
506 int dest_top, | 506 int dest_top, |
507 int blend_type, | 507 int blend_type, |
508 int alpha_flag = 0, | 508 int alpha_flag = 0, |
509 void* pIccTransform = NULL) = 0; | 509 void* pIccTransform = nullptr) = 0; |
510 | 510 |
511 virtual FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, | 511 virtual FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, |
512 uint32_t color, | 512 uint32_t color, |
513 int dest_left, | 513 int dest_left, |
514 int dest_top, | 514 int dest_top, |
515 int dest_width, | 515 int dest_width, |
516 int dest_height, | 516 int dest_height, |
517 const FX_RECT* pClipRect, | 517 const FX_RECT* pClipRect, |
518 uint32_t flags, | 518 uint32_t flags, |
519 int alpha_flag = 0, | 519 int alpha_flag = 0, |
520 void* pIccTransform = NULL, | 520 void* pIccTransform = nullptr, |
521 int blend_type = FXDIB_BLEND_NORMAL) = 0; | 521 int blend_type = FXDIB_BLEND_NORMAL) = 0; |
522 | 522 |
523 virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, | 523 virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, |
524 int bitmap_alpha, | 524 int bitmap_alpha, |
525 uint32_t color, | 525 uint32_t color, |
526 const CFX_Matrix* pMatrix, | 526 const CFX_Matrix* pMatrix, |
527 uint32_t flags, | 527 uint32_t flags, |
528 void*& handle, | 528 void*& handle, |
529 int alpha_flag = 0, | 529 int alpha_flag = 0, |
530 void* pIccTransform = NULL, | 530 void* pIccTransform = nullptr, |
531 int blend_type = FXDIB_BLEND_NORMAL) = 0; | 531 int blend_type = FXDIB_BLEND_NORMAL) = 0; |
532 | 532 |
533 virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) { | 533 virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) { |
534 return FALSE; | 534 return FALSE; |
535 } | 535 } |
536 | 536 |
537 virtual void CancelDIBits(void* handle) {} | 537 virtual void CancelDIBits(void* handle) {} |
538 | 538 |
539 virtual FX_BOOL DrawDeviceText(int nChars, | 539 virtual FX_BOOL DrawDeviceText(int nChars, |
540 const FXTEXT_CHARPOS* pCharPos, | 540 const FXTEXT_CHARPOS* pCharPos, |
541 CFX_Font* pFont, | 541 CFX_Font* pFont, |
542 CFX_FontCache* pCache, | 542 CFX_FontCache* pCache, |
543 const CFX_Matrix* pObject2Device, | 543 const CFX_Matrix* pObject2Device, |
544 FX_FLOAT font_size, | 544 FX_FLOAT font_size, |
545 uint32_t color, | 545 uint32_t color, |
546 int alpha_flag = 0, | 546 int alpha_flag = 0, |
547 void* pIccTransform = NULL) { | 547 void* pIccTransform = nullptr) { |
548 return FALSE; | 548 return FALSE; |
549 } | 549 } |
550 | 550 |
551 virtual void* GetPlatformSurface() const { return NULL; } | 551 virtual void* GetPlatformSurface() const { return nullptr; } |
552 virtual int GetDriverType() const { return 0; } | 552 virtual int GetDriverType() const { return 0; } |
553 virtual void ClearDriver() {} | 553 virtual void ClearDriver() {} |
554 | 554 |
555 virtual FX_BOOL DrawShading(const CPDF_ShadingPattern* pPattern, | 555 virtual FX_BOOL DrawShading(const CPDF_ShadingPattern* pPattern, |
556 const CFX_Matrix* pMatrix, | 556 const CFX_Matrix* pMatrix, |
557 const FX_RECT& clip_rect, | 557 const FX_RECT& clip_rect, |
558 int alpha, | 558 int alpha, |
559 FX_BOOL bAlphaMode) { | 559 FX_BOOL bAlphaMode) { |
560 return false; | 560 return false; |
561 } | 561 } |
562 }; | 562 }; |
563 | 563 |
564 #endif // CORE_FXGE_INCLUDE_FX_GE_H_ | 564 #endif // CORE_FXGE_INCLUDE_FX_GE_H_ |
OLD | NEW |