| 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_INCLUDE_FXGE_FX_GE_H_ | 7 #ifndef CORE_INCLUDE_FXGE_FX_GE_H_ |
| 8 #define CORE_INCLUDE_FXGE_FX_GE_H_ | 8 #define CORE_INCLUDE_FXGE_FX_GE_H_ |
| 9 | 9 |
| 10 #include "core/include/fxge/fx_dib.h" | 10 #include "core/include/fxge/fx_dib.h" |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 #define FX_FILL_TEXT_MODE 128 | 228 #define FX_FILL_TEXT_MODE 128 |
| 229 #define FX_ZEROAREA_FILL 256 | 229 #define FX_ZEROAREA_FILL 256 |
| 230 #define FXFILL_NOPATHSMOOTH 512 | 230 #define FXFILL_NOPATHSMOOTH 512 |
| 231 #define FXTEXT_CLEARTYPE 0x01 | 231 #define FXTEXT_CLEARTYPE 0x01 |
| 232 #define FXTEXT_BGR_STRIPE 0x02 | 232 #define FXTEXT_BGR_STRIPE 0x02 |
| 233 #define FXTEXT_PRINTGRAPHICTEXT 0x04 | 233 #define FXTEXT_PRINTGRAPHICTEXT 0x04 |
| 234 #define FXTEXT_NO_NATIVETEXT 0x08 | 234 #define FXTEXT_NO_NATIVETEXT 0x08 |
| 235 #define FXTEXT_PRINTIMAGETEXT 0x10 | 235 #define FXTEXT_PRINTIMAGETEXT 0x10 |
| 236 #define FXTEXT_NOSMOOTH 0x20 | 236 #define FXTEXT_NOSMOOTH 0x20 |
| 237 typedef struct { | 237 typedef struct { |
| 238 FX_DWORD m_GlyphIndex; | 238 uint32_t m_GlyphIndex; |
| 239 FX_FLOAT m_OriginX, m_OriginY; | 239 FX_FLOAT m_OriginX, m_OriginY; |
| 240 int m_FontCharWidth; | 240 int m_FontCharWidth; |
| 241 FX_BOOL m_bGlyphAdjust; | 241 FX_BOOL m_bGlyphAdjust; |
| 242 FX_FLOAT m_AdjustMatrix[4]; | 242 FX_FLOAT m_AdjustMatrix[4]; |
| 243 FX_DWORD m_ExtGID; | 243 uint32_t m_ExtGID; |
| 244 FX_BOOL m_bFontStyle; | 244 FX_BOOL m_bFontStyle; |
| 245 } FXTEXT_CHARPOS; | 245 } FXTEXT_CHARPOS; |
| 246 | 246 |
| 247 class CFX_RenderDevice { | 247 class CFX_RenderDevice { |
| 248 public: | 248 public: |
| 249 CFX_RenderDevice(); | 249 CFX_RenderDevice(); |
| 250 virtual ~CFX_RenderDevice(); | 250 virtual ~CFX_RenderDevice(); |
| 251 | 251 |
| 252 void SetDeviceDriver(IFX_RenderDeviceDriver* pDriver); | 252 void SetDeviceDriver(IFX_RenderDeviceDriver* pDriver); |
| 253 IFX_RenderDeviceDriver* GetDeviceDriver() const { return m_pDeviceDriver; } | 253 IFX_RenderDeviceDriver* GetDeviceDriver() const { return m_pDeviceDriver; } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 279 int fill_mode); | 279 int fill_mode); |
| 280 | 280 |
| 281 FX_BOOL SetClip_Rect(const FX_RECT& pRect); | 281 FX_BOOL SetClip_Rect(const FX_RECT& pRect); |
| 282 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, | 282 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, |
| 283 const CFX_Matrix* pObject2Device, | 283 const CFX_Matrix* pObject2Device, |
| 284 const CFX_GraphStateData* pGraphState); | 284 const CFX_GraphStateData* pGraphState); |
| 285 | 285 |
| 286 FX_BOOL DrawPath(const CFX_PathData* pPathData, | 286 FX_BOOL DrawPath(const CFX_PathData* pPathData, |
| 287 const CFX_Matrix* pObject2Device, | 287 const CFX_Matrix* pObject2Device, |
| 288 const CFX_GraphStateData* pGraphState, | 288 const CFX_GraphStateData* pGraphState, |
| 289 FX_DWORD fill_color, | 289 uint32_t fill_color, |
| 290 FX_DWORD stroke_color, | 290 uint32_t stroke_color, |
| 291 int fill_mode, | 291 int fill_mode, |
| 292 int alpha_flag = 0, | 292 int alpha_flag = 0, |
| 293 void* pIccTransform = NULL, | 293 void* pIccTransform = NULL, |
| 294 int blend_type = FXDIB_BLEND_NORMAL); | 294 int blend_type = FXDIB_BLEND_NORMAL); |
| 295 | 295 |
| 296 FX_BOOL SetPixel(int x, | 296 FX_BOOL SetPixel(int x, |
| 297 int y, | 297 int y, |
| 298 FX_DWORD color, | 298 uint32_t color, |
| 299 int alpha_flag = 0, | 299 int alpha_flag = 0, |
| 300 void* pIccTransform = NULL); | 300 void* pIccTransform = NULL); |
| 301 | 301 |
| 302 FX_BOOL FillRect(const FX_RECT* pRect, | 302 FX_BOOL FillRect(const FX_RECT* pRect, |
| 303 FX_DWORD color, | 303 uint32_t color, |
| 304 int alpha_flag = 0, | 304 int alpha_flag = 0, |
| 305 void* pIccTransform = NULL, | 305 void* pIccTransform = NULL, |
| 306 int blend_type = FXDIB_BLEND_NORMAL); | 306 int blend_type = FXDIB_BLEND_NORMAL); |
| 307 | 307 |
| 308 FX_BOOL DrawCosmeticLine(FX_FLOAT x1, | 308 FX_BOOL DrawCosmeticLine(FX_FLOAT x1, |
| 309 FX_FLOAT y1, | 309 FX_FLOAT y1, |
| 310 FX_FLOAT x2, | 310 FX_FLOAT x2, |
| 311 FX_FLOAT y2, | 311 FX_FLOAT y2, |
| 312 FX_DWORD color, | 312 uint32_t color, |
| 313 int fill_mode = 0, | 313 int fill_mode = 0, |
| 314 int alpha_flag = 0, | 314 int alpha_flag = 0, |
| 315 void* pIccTransform = NULL, | 315 void* pIccTransform = NULL, |
| 316 int blend_type = FXDIB_BLEND_NORMAL); | 316 int blend_type = FXDIB_BLEND_NORMAL); |
| 317 | 317 |
| 318 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, | 318 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, |
| 319 int left, | 319 int left, |
| 320 int top, | 320 int top, |
| 321 void* pIccTransform = NULL); | 321 void* pIccTransform = NULL); |
| 322 | 322 |
| 323 CFX_DIBitmap* GetBackDrop(); | 323 CFX_DIBitmap* GetBackDrop(); |
| 324 | 324 |
| 325 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | 325 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, |
| 326 int left, | 326 int left, |
| 327 int top, | 327 int top, |
| 328 int blend_type = FXDIB_BLEND_NORMAL, | 328 int blend_type = FXDIB_BLEND_NORMAL, |
| 329 void* pIccTransform = NULL); | 329 void* pIccTransform = NULL); |
| 330 | 330 |
| 331 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, | 331 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, |
| 332 int left, | 332 int left, |
| 333 int top, | 333 int top, |
| 334 int dest_width, | 334 int dest_width, |
| 335 int dest_height, | 335 int dest_height, |
| 336 FX_DWORD flags = 0, | 336 uint32_t flags = 0, |
| 337 void* pIccTransform = NULL, | 337 void* pIccTransform = NULL, |
| 338 int blend_type = FXDIB_BLEND_NORMAL); | 338 int blend_type = FXDIB_BLEND_NORMAL); |
| 339 | 339 |
| 340 FX_BOOL SetBitMask(const CFX_DIBSource* pBitmap, | 340 FX_BOOL SetBitMask(const CFX_DIBSource* pBitmap, |
| 341 int left, | 341 int left, |
| 342 int top, | 342 int top, |
| 343 FX_DWORD color, | 343 uint32_t color, |
| 344 int alpha_flag = 0, | 344 int alpha_flag = 0, |
| 345 void* pIccTransform = NULL); | 345 void* pIccTransform = NULL); |
| 346 | 346 |
| 347 FX_BOOL StretchBitMask(const CFX_DIBSource* pBitmap, | 347 FX_BOOL StretchBitMask(const CFX_DIBSource* pBitmap, |
| 348 int left, | 348 int left, |
| 349 int top, | 349 int top, |
| 350 int dest_width, | 350 int dest_width, |
| 351 int dest_height, | 351 int dest_height, |
| 352 FX_DWORD color, | 352 uint32_t color, |
| 353 FX_DWORD flags = 0, | 353 uint32_t flags = 0, |
| 354 int alpha_flag = 0, | 354 int alpha_flag = 0, |
| 355 void* pIccTransform = NULL); | 355 void* pIccTransform = NULL); |
| 356 | 356 |
| 357 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, | 357 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, |
| 358 int bitmap_alpha, | 358 int bitmap_alpha, |
| 359 FX_DWORD color, | 359 uint32_t color, |
| 360 const CFX_Matrix* pMatrix, | 360 const CFX_Matrix* pMatrix, |
| 361 FX_DWORD flags, | 361 uint32_t flags, |
| 362 void*& handle, | 362 void*& handle, |
| 363 int alpha_flag = 0, | 363 int alpha_flag = 0, |
| 364 void* pIccTransform = NULL, | 364 void* pIccTransform = NULL, |
| 365 int blend_type = FXDIB_BLEND_NORMAL); | 365 int blend_type = FXDIB_BLEND_NORMAL); |
| 366 | 366 |
| 367 FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause); | 367 FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause); |
| 368 | 368 |
| 369 void CancelDIBits(void* handle); | 369 void CancelDIBits(void* handle); |
| 370 | 370 |
| 371 FX_BOOL DrawNormalText(int nChars, | 371 FX_BOOL DrawNormalText(int nChars, |
| 372 const FXTEXT_CHARPOS* pCharPos, | 372 const FXTEXT_CHARPOS* pCharPos, |
| 373 CFX_Font* pFont, | 373 CFX_Font* pFont, |
| 374 CFX_FontCache* pCache, | 374 CFX_FontCache* pCache, |
| 375 FX_FLOAT font_size, | 375 FX_FLOAT font_size, |
| 376 const CFX_Matrix* pText2Device, | 376 const CFX_Matrix* pText2Device, |
| 377 FX_DWORD fill_color, | 377 uint32_t fill_color, |
| 378 FX_DWORD text_flags, | 378 uint32_t text_flags, |
| 379 int alpha_flag = 0, | 379 int alpha_flag = 0, |
| 380 void* pIccTransform = NULL); | 380 void* pIccTransform = NULL); |
| 381 | 381 |
| 382 FX_BOOL DrawTextPath(int nChars, | 382 FX_BOOL DrawTextPath(int nChars, |
| 383 const FXTEXT_CHARPOS* pCharPos, | 383 const FXTEXT_CHARPOS* pCharPos, |
| 384 CFX_Font* pFont, | 384 CFX_Font* pFont, |
| 385 CFX_FontCache* pCache, | 385 CFX_FontCache* pCache, |
| 386 FX_FLOAT font_size, | 386 FX_FLOAT font_size, |
| 387 const CFX_Matrix* pText2User, | 387 const CFX_Matrix* pText2User, |
| 388 const CFX_Matrix* pUser2Device, | 388 const CFX_Matrix* pUser2Device, |
| 389 const CFX_GraphStateData* pGraphState, | 389 const CFX_GraphStateData* pGraphState, |
| 390 FX_DWORD fill_color, | 390 uint32_t fill_color, |
| 391 FX_DWORD stroke_color, | 391 uint32_t stroke_color, |
| 392 CFX_PathData* pClippingPath, | 392 CFX_PathData* pClippingPath, |
| 393 int nFlag = 0, | 393 int nFlag = 0, |
| 394 int alpha_flag = 0, | 394 int alpha_flag = 0, |
| 395 void* pIccTransform = NULL, | 395 void* pIccTransform = NULL, |
| 396 int blend_type = FXDIB_BLEND_NORMAL); | 396 int blend_type = FXDIB_BLEND_NORMAL); |
| 397 virtual void Begin() {} | 397 virtual void Begin() {} |
| 398 virtual void End() {} | 398 virtual void End() {} |
| 399 | 399 |
| 400 private: | 400 private: |
| 401 void InitDeviceInfo(); | 401 void InitDeviceInfo(); |
| 402 void UpdateClipBox(); | 402 void UpdateClipBox(); |
| 403 FX_BOOL DrawFillStrokePath(const CFX_PathData* pPathData, | 403 FX_BOOL DrawFillStrokePath(const CFX_PathData* pPathData, |
| 404 const CFX_Matrix* pObject2Device, | 404 const CFX_Matrix* pObject2Device, |
| 405 const CFX_GraphStateData* pGraphState, | 405 const CFX_GraphStateData* pGraphState, |
| 406 FX_DWORD fill_color, | 406 uint32_t fill_color, |
| 407 FX_DWORD stroke_color, | 407 uint32_t stroke_color, |
| 408 int fill_mode, | 408 int fill_mode, |
| 409 int alpha_flag, | 409 int alpha_flag, |
| 410 void* pIccTransform, | 410 void* pIccTransform, |
| 411 int blend_type); | 411 int blend_type); |
| 412 | 412 |
| 413 CFX_DIBitmap* m_pBitmap; | 413 CFX_DIBitmap* m_pBitmap; |
| 414 int m_Width; | 414 int m_Width; |
| 415 int m_Height; | 415 int m_Height; |
| 416 int m_bpp; | 416 int m_bpp; |
| 417 int m_RenderCaps; | 417 int m_RenderCaps; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 | 498 |
| 499 virtual FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, | 499 virtual FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, |
| 500 const CFX_Matrix* pObject2Device, | 500 const CFX_Matrix* pObject2Device, |
| 501 const CFX_GraphStateData* pGraphState) { | 501 const CFX_GraphStateData* pGraphState) { |
| 502 return FALSE; | 502 return FALSE; |
| 503 } | 503 } |
| 504 | 504 |
| 505 virtual FX_BOOL DrawPath(const CFX_PathData* pPathData, | 505 virtual FX_BOOL DrawPath(const CFX_PathData* pPathData, |
| 506 const CFX_Matrix* pObject2Device, | 506 const CFX_Matrix* pObject2Device, |
| 507 const CFX_GraphStateData* pGraphState, | 507 const CFX_GraphStateData* pGraphState, |
| 508 FX_DWORD fill_color, | 508 uint32_t fill_color, |
| 509 FX_DWORD stroke_color, | 509 uint32_t stroke_color, |
| 510 int fill_mode, | 510 int fill_mode, |
| 511 int alpha_flag = 0, | 511 int alpha_flag = 0, |
| 512 void* pIccTransform = NULL, | 512 void* pIccTransform = NULL, |
| 513 int blend_type = FXDIB_BLEND_NORMAL) = 0; | 513 int blend_type = FXDIB_BLEND_NORMAL) = 0; |
| 514 | 514 |
| 515 virtual FX_BOOL SetPixel(int x, | 515 virtual FX_BOOL SetPixel(int x, |
| 516 int y, | 516 int y, |
| 517 FX_DWORD color, | 517 uint32_t color, |
| 518 int alpha_flag = 0, | 518 int alpha_flag = 0, |
| 519 void* pIccTransform = NULL) { | 519 void* pIccTransform = NULL) { |
| 520 return FALSE; | 520 return FALSE; |
| 521 } | 521 } |
| 522 | 522 |
| 523 virtual FX_BOOL FillRect(const FX_RECT* pRect, | 523 virtual FX_BOOL FillRect(const FX_RECT* pRect, |
| 524 FX_DWORD fill_color, | 524 uint32_t fill_color, |
| 525 int alpha_flag = 0, | 525 int alpha_flag = 0, |
| 526 void* pIccTransform = NULL, | 526 void* pIccTransform = NULL, |
| 527 int blend_type = FXDIB_BLEND_NORMAL) { | 527 int blend_type = FXDIB_BLEND_NORMAL) { |
| 528 return FALSE; | 528 return FALSE; |
| 529 } | 529 } |
| 530 | 530 |
| 531 virtual FX_BOOL DrawCosmeticLine(FX_FLOAT x1, | 531 virtual FX_BOOL DrawCosmeticLine(FX_FLOAT x1, |
| 532 FX_FLOAT y1, | 532 FX_FLOAT y1, |
| 533 FX_FLOAT x2, | 533 FX_FLOAT x2, |
| 534 FX_FLOAT y2, | 534 FX_FLOAT y2, |
| 535 FX_DWORD color, | 535 uint32_t color, |
| 536 int alpha_flag = 0, | 536 int alpha_flag = 0, |
| 537 void* pIccTransform = NULL, | 537 void* pIccTransform = NULL, |
| 538 int blend_type = FXDIB_BLEND_NORMAL) { | 538 int blend_type = FXDIB_BLEND_NORMAL) { |
| 539 return FALSE; | 539 return FALSE; |
| 540 } | 540 } |
| 541 | 541 |
| 542 virtual FX_BOOL GetClipBox(FX_RECT* pRect) = 0; | 542 virtual FX_BOOL GetClipBox(FX_RECT* pRect) = 0; |
| 543 | 543 |
| 544 virtual FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, | 544 virtual FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, |
| 545 int left, | 545 int left, |
| 546 int top, | 546 int top, |
| 547 void* pIccTransform = NULL, | 547 void* pIccTransform = NULL, |
| 548 FX_BOOL bDEdge = FALSE) { | 548 FX_BOOL bDEdge = FALSE) { |
| 549 return FALSE; | 549 return FALSE; |
| 550 } | 550 } |
| 551 virtual CFX_DIBitmap* GetBackDrop() { return NULL; } | 551 virtual CFX_DIBitmap* GetBackDrop() { return NULL; } |
| 552 | 552 |
| 553 virtual FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | 553 virtual FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, |
| 554 FX_DWORD color, | 554 uint32_t color, |
| 555 const FX_RECT* pSrcRect, | 555 const FX_RECT* pSrcRect, |
| 556 int dest_left, | 556 int dest_left, |
| 557 int dest_top, | 557 int dest_top, |
| 558 int blend_type, | 558 int blend_type, |
| 559 int alpha_flag = 0, | 559 int alpha_flag = 0, |
| 560 void* pIccTransform = NULL) = 0; | 560 void* pIccTransform = NULL) = 0; |
| 561 | 561 |
| 562 virtual FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, | 562 virtual FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, |
| 563 FX_DWORD color, | 563 uint32_t color, |
| 564 int dest_left, | 564 int dest_left, |
| 565 int dest_top, | 565 int dest_top, |
| 566 int dest_width, | 566 int dest_width, |
| 567 int dest_height, | 567 int dest_height, |
| 568 const FX_RECT* pClipRect, | 568 const FX_RECT* pClipRect, |
| 569 FX_DWORD flags, | 569 uint32_t flags, |
| 570 int alpha_flag = 0, | 570 int alpha_flag = 0, |
| 571 void* pIccTransform = NULL, | 571 void* pIccTransform = NULL, |
| 572 int blend_type = FXDIB_BLEND_NORMAL) = 0; | 572 int blend_type = FXDIB_BLEND_NORMAL) = 0; |
| 573 | 573 |
| 574 virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, | 574 virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, |
| 575 int bitmap_alpha, | 575 int bitmap_alpha, |
| 576 FX_DWORD color, | 576 uint32_t color, |
| 577 const CFX_Matrix* pMatrix, | 577 const CFX_Matrix* pMatrix, |
| 578 FX_DWORD flags, | 578 uint32_t flags, |
| 579 void*& handle, | 579 void*& handle, |
| 580 int alpha_flag = 0, | 580 int alpha_flag = 0, |
| 581 void* pIccTransform = NULL, | 581 void* pIccTransform = NULL, |
| 582 int blend_type = FXDIB_BLEND_NORMAL) = 0; | 582 int blend_type = FXDIB_BLEND_NORMAL) = 0; |
| 583 | 583 |
| 584 virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) { | 584 virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) { |
| 585 return FALSE; | 585 return FALSE; |
| 586 } | 586 } |
| 587 | 587 |
| 588 virtual void CancelDIBits(void* handle) {} | 588 virtual void CancelDIBits(void* handle) {} |
| 589 | 589 |
| 590 virtual FX_BOOL DrawDeviceText(int nChars, | 590 virtual FX_BOOL DrawDeviceText(int nChars, |
| 591 const FXTEXT_CHARPOS* pCharPos, | 591 const FXTEXT_CHARPOS* pCharPos, |
| 592 CFX_Font* pFont, | 592 CFX_Font* pFont, |
| 593 CFX_FontCache* pCache, | 593 CFX_FontCache* pCache, |
| 594 const CFX_Matrix* pObject2Device, | 594 const CFX_Matrix* pObject2Device, |
| 595 FX_FLOAT font_size, | 595 FX_FLOAT font_size, |
| 596 FX_DWORD color, | 596 uint32_t color, |
| 597 int alpha_flag = 0, | 597 int alpha_flag = 0, |
| 598 void* pIccTransform = NULL) { | 598 void* pIccTransform = NULL) { |
| 599 return FALSE; | 599 return FALSE; |
| 600 } | 600 } |
| 601 | 601 |
| 602 virtual void* GetPlatformSurface() const { return NULL; } | 602 virtual void* GetPlatformSurface() const { return NULL; } |
| 603 virtual int GetDriverType() const { return 0; } | 603 virtual int GetDriverType() const { return 0; } |
| 604 virtual void ClearDriver() {} | 604 virtual void ClearDriver() {} |
| 605 | 605 |
| 606 virtual FX_BOOL DrawShading(CPDF_ShadingPattern* pPattern, | 606 virtual FX_BOOL DrawShading(CPDF_ShadingPattern* pPattern, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 | 645 |
| 646 void SetClip_PathStroke(const CFX_PathData* pPathData, | 646 void SetClip_PathStroke(const CFX_PathData* pPathData, |
| 647 const CFX_Matrix* pObject2Device, | 647 const CFX_Matrix* pObject2Device, |
| 648 const CFX_GraphStateData* pGraphState); | 648 const CFX_GraphStateData* pGraphState); |
| 649 | 649 |
| 650 FX_RECT GetClipBox() { return m_ClipBox; } | 650 FX_RECT GetClipBox() { return m_ClipBox; } |
| 651 | 651 |
| 652 FX_BOOL DrawPath(const CFX_PathData* pPathData, | 652 FX_BOOL DrawPath(const CFX_PathData* pPathData, |
| 653 const CFX_Matrix* pObject2Device, | 653 const CFX_Matrix* pObject2Device, |
| 654 const CFX_GraphStateData* pGraphState, | 654 const CFX_GraphStateData* pGraphState, |
| 655 FX_DWORD fill_color, | 655 uint32_t fill_color, |
| 656 FX_DWORD stroke_color, | 656 uint32_t stroke_color, |
| 657 int fill_mode, | 657 int fill_mode, |
| 658 int alpha_flag = 0, | 658 int alpha_flag = 0, |
| 659 void* pIccTransform = NULL); | 659 void* pIccTransform = NULL); |
| 660 | 660 |
| 661 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | 661 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, |
| 662 FX_DWORD color, | 662 uint32_t color, |
| 663 int dest_left, | 663 int dest_left, |
| 664 int dest_top, | 664 int dest_top, |
| 665 int alpha_flag = 0, | 665 int alpha_flag = 0, |
| 666 void* pIccTransform = NULL); | 666 void* pIccTransform = NULL); |
| 667 | 667 |
| 668 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, | 668 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, |
| 669 FX_DWORD color, | 669 uint32_t color, |
| 670 int dest_left, | 670 int dest_left, |
| 671 int dest_top, | 671 int dest_top, |
| 672 int dest_width, | 672 int dest_width, |
| 673 int dest_height, | 673 int dest_height, |
| 674 FX_DWORD flags, | 674 uint32_t flags, |
| 675 int alpha_flag = 0, | 675 int alpha_flag = 0, |
| 676 void* pIccTransform = NULL); | 676 void* pIccTransform = NULL); |
| 677 | 677 |
| 678 FX_BOOL DrawDIBits(const CFX_DIBSource* pBitmap, | 678 FX_BOOL DrawDIBits(const CFX_DIBSource* pBitmap, |
| 679 FX_DWORD color, | 679 uint32_t color, |
| 680 const CFX_Matrix* pMatrix, | 680 const CFX_Matrix* pMatrix, |
| 681 FX_DWORD flags, | 681 uint32_t flags, |
| 682 int alpha_flag = 0, | 682 int alpha_flag = 0, |
| 683 void* pIccTransform = NULL); | 683 void* pIccTransform = NULL); |
| 684 | 684 |
| 685 FX_BOOL DrawText(int nChars, | 685 FX_BOOL DrawText(int nChars, |
| 686 const FXTEXT_CHARPOS* pCharPos, | 686 const FXTEXT_CHARPOS* pCharPos, |
| 687 CFX_Font* pFont, | 687 CFX_Font* pFont, |
| 688 CFX_FontCache* pCache, | 688 CFX_FontCache* pCache, |
| 689 const CFX_Matrix* pObject2Device, | 689 const CFX_Matrix* pObject2Device, |
| 690 FX_FLOAT font_size, | 690 FX_FLOAT font_size, |
| 691 FX_DWORD color, | 691 uint32_t color, |
| 692 int alpha_flag = 0, | 692 int alpha_flag = 0, |
| 693 void* pIccTransform = NULL); | 693 void* pIccTransform = NULL); |
| 694 | 694 |
| 695 private: | 695 private: |
| 696 IFX_PSOutput* m_pOutput; | 696 IFX_PSOutput* m_pOutput; |
| 697 | 697 |
| 698 int m_PSLevel; | 698 int m_PSLevel; |
| 699 | 699 |
| 700 CFX_GraphStateData m_CurGraphState; | 700 CFX_GraphStateData m_CurGraphState; |
| 701 | 701 |
| 702 FX_BOOL m_bGraphStateSet; | 702 FX_BOOL m_bGraphStateSet; |
| 703 | 703 |
| 704 FX_BOOL m_bCmykOutput; | 704 FX_BOOL m_bCmykOutput; |
| 705 | 705 |
| 706 FX_BOOL m_bColorSet; | 706 FX_BOOL m_bColorSet; |
| 707 | 707 |
| 708 FX_DWORD m_LastColor; | 708 uint32_t m_LastColor; |
| 709 | 709 |
| 710 FX_RECT m_ClipBox; | 710 FX_RECT m_ClipBox; |
| 711 | 711 |
| 712 CFX_ArrayTemplate<CPSFont*> m_PSFontList; | 712 CFX_ArrayTemplate<CPSFont*> m_PSFontList; |
| 713 | 713 |
| 714 CFX_ArrayTemplate<FX_RECT> m_ClipBoxStack; | 714 CFX_ArrayTemplate<FX_RECT> m_ClipBoxStack; |
| 715 FX_BOOL m_bInited; | 715 FX_BOOL m_bInited; |
| 716 | 716 |
| 717 void OutputPath(const CFX_PathData* pPathData, | 717 void OutputPath(const CFX_PathData* pPathData, |
| 718 const CFX_Matrix* pObject2Device); | 718 const CFX_Matrix* pObject2Device); |
| 719 | 719 |
| 720 void SetGraphState(const CFX_GraphStateData* pGraphState); | 720 void SetGraphState(const CFX_GraphStateData* pGraphState); |
| 721 | 721 |
| 722 void SetColor(FX_DWORD color, int alpha_flag, void* pIccTransform); | 722 void SetColor(uint32_t color, int alpha_flag, void* pIccTransform); |
| 723 | 723 |
| 724 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, | 724 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, |
| 725 CFX_Font* pFont, | 725 CFX_Font* pFont, |
| 726 const FXTEXT_CHARPOS& charpos, | 726 const FXTEXT_CHARPOS& charpos, |
| 727 int& ps_fontnum, | 727 int& ps_fontnum, |
| 728 int& ps_glyphindex); | 728 int& ps_glyphindex); |
| 729 | 729 |
| 730 void WritePSBinary(const uint8_t* data, int len); | 730 void WritePSBinary(const uint8_t* data, int len); |
| 731 }; | 731 }; |
| 732 | 732 |
| 733 #endif // CORE_INCLUDE_FXGE_FX_GE_H_ | 733 #endif // CORE_INCLUDE_FXGE_FX_GE_H_ |
| OLD | NEW |