| 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 "fx_dib.h" | 10 #include "fx_dib.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 void SetPointCount(int nPoints); | 186 void SetPointCount(int nPoints); |
| 187 void AllocPointCount(int nPoints); | 187 void AllocPointCount(int nPoints); |
| 188 void AddPointCount(int addPoints); | 188 void AddPointCount(int addPoints); |
| 189 | 189 |
| 190 CFX_FloatRect GetBoundingBox() const; | 190 CFX_FloatRect GetBoundingBox() const; |
| 191 | 191 |
| 192 CFX_FloatRect GetBoundingBox(FX_FLOAT line_width, FX_FLOAT mit
er_limit) const; | 192 CFX_FloatRect GetBoundingBox(FX_FLOAT line_width, FX_FLOAT mit
er_limit) const; |
| 193 | 193 |
| 194 void Transform(const CFX_AffineMatrix* pMatri
x); | 194 void Transform(const CFX_AffineMatrix* pMatri
x); |
| 195 | 195 |
| 196 FX_BOOL» » » » IsRect() const; | 196 bool» » » » IsRect() const; |
| 197 | 197 |
| 198 FX_BOOL» » » » GetZeroAreaPath(CFX_PathData& NewPath, C
FX_AffineMatrix* pMatrix, FX_BOOL&bThin, FX_BOOL bAdjust) const; | 198 bool» » » » GetZeroAreaPath(CFX_PathData& NewPath, C
FX_AffineMatrix* pMatrix, bool&bThin, bool bAdjust) const; |
| 199 | 199 |
| 200 FX_BOOL» » » » IsRect(const CFX_AffineMatrix* pMatrix,
CFX_FloatRect* rect) const; | 200 bool» » » » IsRect(const CFX_AffineMatrix* pMatrix,
CFX_FloatRect* rect) const; |
| 201 | 201 |
| 202 void Append(const CFX_PathData* pSrc, const CFX_AffineMatrix* pMatrix); | 202 void Append(const CFX_PathData* pSrc, const CFX_AffineMatrix* pMatrix); |
| 203 void AppendRect(FX_FLOAT left, FX_FLOAT bottom, FX_FLOAT right, FX_FLOAT top
); | 203 void AppendRect(FX_FLOAT left, FX_FLOAT bottom, FX_FLOAT right, FX_FLOAT top
); |
| 204 | 204 |
| 205 void SetPoint(int index, FX_FLOAT x, FX_FLOAT
y, int flag); | 205 void SetPoint(int index, FX_FLOAT x, FX_FLOAT
y, int flag); |
| 206 | 206 |
| 207 void TrimPoints(int nPoints); | 207 void TrimPoints(int nPoints); |
| 208 | 208 |
| 209 void Copy(const CFX_PathData &src); | 209 void Copy(const CFX_PathData &src); |
| 210 protected: | 210 protected: |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 #define FXTEXT_CLEARTYPE 0x01 | 287 #define FXTEXT_CLEARTYPE 0x01 |
| 288 #define FXTEXT_BGR_STRIPE 0x02 | 288 #define FXTEXT_BGR_STRIPE 0x02 |
| 289 #define FXTEXT_PRINTGRAPHICTEXT 0x04 | 289 #define FXTEXT_PRINTGRAPHICTEXT 0x04 |
| 290 #define FXTEXT_NO_NATIVETEXT 0x08 | 290 #define FXTEXT_NO_NATIVETEXT 0x08 |
| 291 #define FXTEXT_PRINTIMAGETEXT 0x10 | 291 #define FXTEXT_PRINTIMAGETEXT 0x10 |
| 292 #define FXTEXT_NOSMOOTH 0x20 | 292 #define FXTEXT_NOSMOOTH 0x20 |
| 293 typedef struct { | 293 typedef struct { |
| 294 FX_DWORD m_GlyphIndex; | 294 FX_DWORD m_GlyphIndex; |
| 295 FX_FLOAT m_OriginX, m_OriginY; | 295 FX_FLOAT m_OriginX, m_OriginY; |
| 296 int m_FontCharWidth; | 296 int m_FontCharWidth; |
| 297 FX_BOOL» » » » m_bGlyphAdjust; | 297 bool» » » » m_bGlyphAdjust; |
| 298 FX_FLOAT m_AdjustMatrix[4]; | 298 FX_FLOAT m_AdjustMatrix[4]; |
| 299 FX_DWORD m_ExtGID; | 299 FX_DWORD m_ExtGID; |
| 300 FX_BOOL» » » » m_bFontStyle; | 300 bool» » » » m_bFontStyle; |
| 301 } FXTEXT_CHARPOS; | 301 } FXTEXT_CHARPOS; |
| 302 class CFX_RenderDevice | 302 class CFX_RenderDevice |
| 303 { | 303 { |
| 304 public: | 304 public: |
| 305 CFX_RenderDevice(); | 305 CFX_RenderDevice(); |
| 306 | 306 |
| 307 virtual ~CFX_RenderDevice(); | 307 virtual ~CFX_RenderDevice(); |
| 308 | 308 |
| 309 void SetDeviceDriver(IFX_RenderDeviceDriver* pDriver)
; | 309 void SetDeviceDriver(IFX_RenderDeviceDriver* pDriver)
; |
| 310 | 310 |
| 311 IFX_RenderDeviceDriver* GetDeviceDriver() const | 311 IFX_RenderDeviceDriver* GetDeviceDriver() const |
| 312 { | 312 { |
| 313 return m_pDeviceDriver; | 313 return m_pDeviceDriver; |
| 314 } | 314 } |
| 315 | 315 |
| 316 FX_BOOL» » » StartRendering(); | 316 bool» » » StartRendering(); |
| 317 | 317 |
| 318 void EndRendering(); | 318 void EndRendering(); |
| 319 | 319 |
| 320 | 320 |
| 321 | 321 |
| 322 void SaveState(); | 322 void SaveState(); |
| 323 | 323 |
| 324 void» » » RestoreState(FX_BOOL bKeepSaved = FALSE); | 324 void» » » RestoreState(bool bKeepSaved = false); |
| 325 | 325 |
| 326 | 326 |
| 327 | 327 |
| 328 | 328 |
| 329 int GetWidth() const | 329 int GetWidth() const |
| 330 { | 330 { |
| 331 return m_Width; | 331 return m_Width; |
| 332 } | 332 } |
| 333 | 333 |
| 334 int GetHeight() const | 334 int GetHeight() const |
| (...skipping 23 matching lines...) Expand all Loading... |
| 358 | 358 |
| 359 CFX_DIBitmap* GetBitmap() const | 359 CFX_DIBitmap* GetBitmap() const |
| 360 { | 360 { |
| 361 return m_pBitmap; | 361 return m_pBitmap; |
| 362 } | 362 } |
| 363 void SetBitmap(CFX_DIBitmap* pBitmap) | 363 void SetBitmap(CFX_DIBitmap* pBitmap) |
| 364 { | 364 { |
| 365 m_pBitmap = pBitmap; | 365 m_pBitmap = pBitmap; |
| 366 } | 366 } |
| 367 | 367 |
| 368 FX_BOOL» » » CreateCompatibleBitmap(CFX_DIBitmap* pDIB, int w
idth, int height) const; | 368 bool» » » CreateCompatibleBitmap(CFX_DIBitmap* pDIB, int w
idth, int height) const; |
| 369 | 369 |
| 370 const FX_RECT& GetClipBox() const | 370 const FX_RECT& GetClipBox() const |
| 371 { | 371 { |
| 372 return m_ClipBox; | 372 return m_ClipBox; |
| 373 } | 373 } |
| 374 | 374 |
| 375 FX_BOOL» » » SetClip_PathFill(const CFX_PathData* pPathData, | 375 bool» » » SetClip_PathFill(const CFX_PathData* pPathData, |
| 376 const CFX_AffineMatrix* pObject2Device, | 376 const CFX_AffineMatrix* pObject2Device, |
| 377 int fill_mode | 377 int fill_mode |
| 378 ); | 378 ); |
| 379 | 379 |
| 380 FX_BOOL» » » SetClip_Rect(const FX_RECT* pRect); | 380 bool» » » SetClip_Rect(const FX_RECT* pRect); |
| 381 | 381 |
| 382 FX_BOOL» » » SetClip_PathStroke(const CFX_PathData* pPathData
, | 382 bool» » » SetClip_PathStroke(const CFX_PathData* pPathData
, |
| 383 const CFX_AffineMatrix* pObject2Device, | 383 const CFX_AffineMatrix* pObject2Device, |
| 384 const CFX_GraphStateData* pGraphState | 384 const CFX_GraphStateData* pGraphState |
| 385 ); | 385 ); |
| 386 | 386 |
| 387 FX_BOOL» » » DrawPath(const CFX_PathData* pPathData, | 387 bool» » » DrawPath(const CFX_PathData* pPathData, |
| 388 const CFX_AffineMatrix* pObject2Device, | 388 const CFX_AffineMatrix* pObject2Device, |
| 389 const CFX_GraphStateData* pGraphState, | 389 const CFX_GraphStateData* pGraphState, |
| 390 FX_DWORD fill_color, | 390 FX_DWORD fill_color, |
| 391 FX_DWORD stroke_color, | 391 FX_DWORD stroke_color, |
| 392 int fill_mode, | 392 int fill_mode, |
| 393 int alpha_flag = 0, | 393 int alpha_flag = 0, |
| 394 void* pIccTransform = NULL, | 394 void* pIccTransform = NULL, |
| 395 int blend_type = FXDIB_BLEND_NORMAL | 395 int blend_type = FXDIB_BLEND_NORMAL |
| 396 ); | 396 ); |
| 397 | 397 |
| 398 FX_BOOL» » » SetPixel(int x, int y, FX_DWORD color, | 398 bool» » » SetPixel(int x, int y, FX_DWORD color, |
| 399 int alpha_flag = 0, void* pIccTransform = NULL); | 399 int alpha_flag = 0, void* pIccTransform = NULL); |
| 400 | 400 |
| 401 FX_BOOL» » » FillRect(const FX_RECT* pRect, FX_DWORD color, | 401 bool» » » FillRect(const FX_RECT* pRect, FX_DWORD color, |
| 402 int alpha_flag = 0, void* pIccTransform = NULL, int
blend_type = FXDIB_BLEND_NORMAL); | 402 int alpha_flag = 0, void* pIccTransform = NULL, int
blend_type = FXDIB_BLEND_NORMAL); |
| 403 | 403 |
| 404 FX_BOOL» » » DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FL
OAT x2, FX_FLOAT y2, FX_DWORD color, | 404 bool» » » DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FL
OAT x2, FX_FLOAT y2, FX_DWORD color, |
| 405 int fill_mode = 0, int alpha_flag = 0, void
* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL); | 405 int fill_mode = 0, int alpha_flag = 0, void
* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL); |
| 406 | 406 |
| 407 FX_BOOL» » » GetDIBits(CFX_DIBitmap* pBitmap, int left, int t
op, void* pIccTransform = NULL); | 407 bool» » » GetDIBits(CFX_DIBitmap* pBitmap, int left, int t
op, void* pIccTransform = NULL); |
| 408 | 408 |
| 409 CFX_DIBitmap* GetBackDrop(); | 409 CFX_DIBitmap* GetBackDrop(); |
| 410 | 410 |
| 411 FX_BOOL» » » SetDIBits(const CFX_DIBSource* pBitmap, int left
, int top, int blend_type = FXDIB_BLEND_NORMAL, | 411 bool» » » SetDIBits(const CFX_DIBSource* pBitmap, int left
, int top, int blend_type = FXDIB_BLEND_NORMAL, |
| 412 void* pIccTransform = NULL); | 412 void* pIccTransform = NULL); |
| 413 | 413 |
| 414 FX_BOOL» » » StretchDIBits(const CFX_DIBSource* pBitmap, int
left, int top, int dest_width, int dest_height, | 414 bool» » » StretchDIBits(const CFX_DIBSource* pBitmap, int
left, int top, int dest_width, int dest_height, |
| 415 FX_DWORD flags = 0, void* pIccTransform = NULL
, int blend_type = FXDIB_BLEND_NORMAL); | 415 FX_DWORD flags = 0, void* pIccTransform = NULL
, int blend_type = FXDIB_BLEND_NORMAL); |
| 416 | 416 |
| 417 FX_BOOL» » » SetBitMask(const CFX_DIBSource* pBitmap, int lef
t, int top, FX_DWORD color, | 417 bool» » » SetBitMask(const CFX_DIBSource* pBitmap, int lef
t, int top, FX_DWORD color, |
| 418 int alpha_flag = 0, void* pIccTransform = NULL); | 418 int alpha_flag = 0, void* pIccTransform = NULL); |
| 419 | 419 |
| 420 FX_BOOL» » » StretchBitMask(const CFX_DIBSource* pBitmap, int
left, int top, int dest_width, int dest_height, | 420 bool» » » StretchBitMask(const CFX_DIBSource* pBitmap, int
left, int top, int dest_width, int dest_height, |
| 421 FX_DWORD color, FX_DWORD flags = 0, int alpha
_flag = 0, void* pIccTransform = NULL); | 421 FX_DWORD color, FX_DWORD flags = 0, int alpha
_flag = 0, void* pIccTransform = NULL); |
| 422 | 422 |
| 423 FX_BOOL» » » StartDIBits(const CFX_DIBSource* pBitmap, int bi
tmap_alpha, FX_DWORD color, | 423 bool» » » StartDIBits(const CFX_DIBSource* pBitmap, int bi
tmap_alpha, FX_DWORD color, |
| 424 const CFX_AffineMatrix* pMatrix, FX_DWORD flags,
void*& handle, | 424 const CFX_AffineMatrix* pMatrix, FX_DWORD flags,
void*& handle, |
| 425 int alpha_flag = 0, void* pIccTransform = NULL,
int blend_type = FXDIB_BLEND_NORMAL); | 425 int alpha_flag = 0, void* pIccTransform = NULL,
int blend_type = FXDIB_BLEND_NORMAL); |
| 426 | 426 |
| 427 FX_BOOL» » » ContinueDIBits(void* handle, IFX_Pause* pPause); | 427 bool» » » ContinueDIBits(void* handle, IFX_Pause* pPause); |
| 428 | 428 |
| 429 void CancelDIBits(void* handle); | 429 void CancelDIBits(void* handle); |
| 430 | 430 |
| 431 FX_BOOL» » » DrawNormalText(int nChars, const FXTEXT_CHARPOS*
pCharPos, | 431 bool» » » DrawNormalText(int nChars, const FXTEXT_CHARPOS*
pCharPos, |
| 432 CFX_Font* pFont, CFX_FontCache* pCache, | 432 CFX_Font* pFont, CFX_FontCache* pCache, |
| 433 FX_FLOAT font_size, const CFX_AffineMatrix* p
Text2Device, | 433 FX_FLOAT font_size, const CFX_AffineMatrix* p
Text2Device, |
| 434 FX_DWORD fill_color, FX_DWORD text_flags, | 434 FX_DWORD fill_color, FX_DWORD text_flags, |
| 435 int alpha_flag = 0, void* pIccTransform = NUL
L); | 435 int alpha_flag = 0, void* pIccTransform = NUL
L); |
| 436 | 436 |
| 437 FX_BOOL» » » DrawTextPath(int nChars, const FXTEXT_CHARPOS* p
CharPos, | 437 bool» » » DrawTextPath(int nChars, const FXTEXT_CHARPOS* p
CharPos, |
| 438 CFX_Font* pFont, CFX_FontCache* pCache, | 438 CFX_Font* pFont, CFX_FontCache* pCache, |
| 439 FX_FLOAT font_size, const CFX_AffineMatrix* pTe
xt2User, | 439 FX_FLOAT font_size, const CFX_AffineMatrix* pTe
xt2User, |
| 440 const CFX_AffineMatrix* pUser2Device, const CFX
_GraphStateData* pGraphState, | 440 const CFX_AffineMatrix* pUser2Device, const CFX
_GraphStateData* pGraphState, |
| 441 FX_DWORD fill_color, FX_DWORD stroke_color, CFX
_PathData* pClippingPath, int nFlag = 0, | 441 FX_DWORD fill_color, FX_DWORD stroke_color, CFX
_PathData* pClippingPath, int nFlag = 0, |
| 442 int alpha_flag = 0, void* pIccTransform = NULL,
int blend_type = FXDIB_BLEND_NORMAL); | 442 int alpha_flag = 0, void* pIccTransform = NULL,
int blend_type = FXDIB_BLEND_NORMAL); |
| 443 virtual void Begin() {} | 443 virtual void Begin() {} |
| 444 virtual void End() {} | 444 virtual void End() {} |
| 445 private: | 445 private: |
| 446 | 446 |
| 447 CFX_DIBitmap* m_pBitmap; | 447 CFX_DIBitmap* m_pBitmap; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 470 void UpdateClipBox(); | 470 void UpdateClipBox(); |
| 471 }; | 471 }; |
| 472 class CFX_FxgeDevice : public CFX_RenderDevice | 472 class CFX_FxgeDevice : public CFX_RenderDevice |
| 473 { | 473 { |
| 474 public: | 474 public: |
| 475 | 475 |
| 476 CFX_FxgeDevice(); | 476 CFX_FxgeDevice(); |
| 477 | 477 |
| 478 ~CFX_FxgeDevice(); | 478 ~CFX_FxgeDevice(); |
| 479 | 479 |
| 480 FX_BOOL» » » Attach(CFX_DIBitmap* pBitmap, int dither_bits =
0, FX_BOOL bRgbByteOrder = FALSE, CFX_DIBitmap* pOriDevice = NULL, FX_BOOL bGrou
pKnockout = FALSE); | 480 bool» » » Attach(CFX_DIBitmap* pBitmap, int dither_bits =
0, bool bRgbByteOrder = false, CFX_DIBitmap* pOriDevice = NULL, bool bGroupKnock
out = false); |
| 481 | 481 |
| 482 FX_BOOL» » » Create(int width, int height, FXDIB_Format forma
t, int dither_bits = 0, CFX_DIBitmap* pOriDevice = NULL); | 482 bool» » » Create(int width, int height, FXDIB_Format forma
t, int dither_bits = 0, CFX_DIBitmap* pOriDevice = NULL); |
| 483 protected: | 483 protected: |
| 484 | 484 |
| 485 FX_BOOL» » » m_bOwnedBitmap; | 485 bool» » » m_bOwnedBitmap; |
| 486 }; | 486 }; |
| 487 class CFX_SkiaDevice : public CFX_RenderDevice | 487 class CFX_SkiaDevice : public CFX_RenderDevice |
| 488 { | 488 { |
| 489 public: | 489 public: |
| 490 | 490 |
| 491 CFX_SkiaDevice(); | 491 CFX_SkiaDevice(); |
| 492 | 492 |
| 493 ~CFX_SkiaDevice(); | 493 ~CFX_SkiaDevice(); |
| 494 | 494 |
| 495 FX_BOOL» » » Attach(CFX_DIBitmap* pBitmap, int dither_bits =
0, FX_BOOL bRgbByteOrder = FALSE, CFX_DIBitmap* pOriDevice = NULL, FX_BOOL bGrou
pKnockout = FALSE); | 495 bool» » » Attach(CFX_DIBitmap* pBitmap, int dither_bits =
0, bool bRgbByteOrder = false, CFX_DIBitmap* pOriDevice = NULL, bool bGroupKnock
out = false); |
| 496 | 496 |
| 497 FX_BOOL» » » Create(int width, int height, FXDIB_Format forma
t, int dither_bits = 0, CFX_DIBitmap* pOriDevice = NULL); | 497 bool» » » Create(int width, int height, FXDIB_Format forma
t, int dither_bits = 0, CFX_DIBitmap* pOriDevice = NULL); |
| 498 protected: | 498 protected: |
| 499 | 499 |
| 500 FX_BOOL» » » m_bOwnedBitmap; | 500 bool» » » m_bOwnedBitmap; |
| 501 }; | 501 }; |
| 502 class IFX_RenderDeviceDriver | 502 class IFX_RenderDeviceDriver |
| 503 { | 503 { |
| 504 public: | 504 public: |
| 505 | 505 |
| 506 static IFX_RenderDeviceDriver*» » CreateFxgeDriver(CFX_DIBitmap* p
Bitmap, FX_BOOL bRgbByteOrder = FALSE, | 506 static IFX_RenderDeviceDriver*» » CreateFxgeDriver(CFX_DIBitmap* p
Bitmap, bool bRgbByteOrder = false, |
| 507 CFX_DIBitmap* pOriDevice = NULL, FX_BOOL bGroupKnockout = FALSE); | 507 CFX_DIBitmap* pOriDevice = NULL, bool bGroupKnockout = false); |
| 508 | 508 |
| 509 virtual ~IFX_RenderDeviceDriver() {} | 509 virtual ~IFX_RenderDeviceDriver() {} |
| 510 virtual void Begin() { } | 510 virtual void Begin() { } |
| 511 virtual void End() { } | 511 virtual void End() { } |
| 512 | 512 |
| 513 virtual int GetDeviceCaps(int caps_id) = 0; | 513 virtual int GetDeviceCaps(int caps_id) = 0; |
| 514 | 514 |
| 515 virtual CFX_Matrix GetCTM() const | 515 virtual CFX_Matrix GetCTM() const |
| 516 { | 516 { |
| 517 return CFX_Matrix(); | 517 return CFX_Matrix(); |
| 518 } | 518 } |
| 519 | 519 |
| 520 virtual FX_BOOL IsPSPrintDriver() | 520 virtual bool IsPSPrintDriver() |
| 521 { | 521 { |
| 522 return FALSE; | 522 return false; |
| 523 } | 523 } |
| 524 | 524 |
| 525 virtual FX_BOOL» StartRendering() | 525 virtual bool» StartRendering() |
| 526 { | 526 { |
| 527 return TRUE; | 527 return true; |
| 528 } | 528 } |
| 529 | 529 |
| 530 virtual void EndRendering() {} | 530 virtual void EndRendering() {} |
| 531 | 531 |
| 532 | 532 |
| 533 | 533 |
| 534 | 534 |
| 535 virtual void SaveState() = 0; | 535 virtual void SaveState() = 0; |
| 536 | 536 |
| 537 virtual void» RestoreState(FX_BOOL bKeepSaved = FALSE) = 0; | 537 virtual void» RestoreState(bool bKeepSaved = false) = 0; |
| 538 | 538 |
| 539 | 539 |
| 540 virtual FX_BOOL» SetClip_PathFill(const CFX_PathData* pPathData, | 540 virtual bool» SetClip_PathFill(const CFX_PathData* pPathData, |
| 541 const CFX_AffineMatrix* pObject2Device, | 541 const CFX_AffineMatrix* pObject2Device, |
| 542 int fill_mode | 542 int fill_mode |
| 543 ) = 0; | 543 ) = 0; |
| 544 | 544 |
| 545 virtual FX_BOOL» SetClip_PathStroke(const CFX_PathData* pPathData, | 545 virtual bool» SetClip_PathStroke(const CFX_PathData* pPathData, |
| 546 const CFX_AffineMatrix* pObject2Device, | 546 const CFX_AffineMatrix* pObject2Device, |
| 547 const CFX_GraphStateData* pGraphState | 547 const CFX_GraphStateData* pGraphState |
| 548 ) | 548 ) |
| 549 { | 549 { |
| 550 return FALSE; | 550 return false; |
| 551 } | 551 } |
| 552 | 552 |
| 553 virtual FX_BOOL» DrawPath(const CFX_PathData* pPathData, | 553 virtual bool» DrawPath(const CFX_PathData* pPathData, |
| 554 const CFX_AffineMatrix* pObject2Device, | 554 const CFX_AffineMatrix* pObject2Device, |
| 555 const CFX_GraphStateData* pGraphState, | 555 const CFX_GraphStateData* pGraphState, |
| 556 FX_DWORD fill_color, | 556 FX_DWORD fill_color, |
| 557 FX_DWORD stroke_color, | 557 FX_DWORD stroke_color, |
| 558 int fill_mode, | 558 int fill_mode, |
| 559 int alpha_flag = 0, | 559 int alpha_flag = 0, |
| 560 void* pIccTransform = NULL, | 560 void* pIccTransform = NULL, |
| 561 int blend_type = FXDIB_BLEND_NORMAL | 561 int blend_type = FXDIB_BLEND_NORMAL |
| 562 ) = 0; | 562 ) = 0; |
| 563 | 563 |
| 564 virtual FX_BOOL» SetPixel(int x, int y, FX_DWORD color, | 564 virtual bool» SetPixel(int x, int y, FX_DWORD color, |
| 565 int alpha_flag = 0, void* pIccTransform = NULL) | 565 int alpha_flag = 0, void* pIccTransform = NULL) |
| 566 { | 566 { |
| 567 return FALSE; | 567 return false; |
| 568 } | 568 } |
| 569 | 569 |
| 570 virtual FX_BOOL FillRect(const FX_RECT* pRect, FX_DWORD fill_color, | 570 virtual bool FillRect(const FX_RECT* pRect, FX_DWORD fill_color, |
| 571 int alpha_flag = 0, void* pIccTransform = NULL, int
blend_type = FXDIB_BLEND_NORMAL) | 571 int alpha_flag = 0, void* pIccTransform = NULL, int
blend_type = FXDIB_BLEND_NORMAL) |
| 572 { | 572 { |
| 573 return FALSE; | 573 return false; |
| 574 } | 574 } |
| 575 | 575 |
| 576 virtual FX_BOOL» DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2,
FX_FLOAT y2, FX_DWORD color, | 576 virtual bool» DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2,
FX_FLOAT y2, FX_DWORD color, |
| 577 int alpha_flag = 0, void* pIccTransform = N
ULL, int blend_type = FXDIB_BLEND_NORMAL) | 577 int alpha_flag = 0, void* pIccTransform = N
ULL, int blend_type = FXDIB_BLEND_NORMAL) |
| 578 { | 578 { |
| 579 return FALSE; | 579 return false; |
| 580 } | 580 } |
| 581 | 581 |
| 582 virtual FX_BOOL GetClipBox(FX_RECT* pRect) = 0; | 582 virtual bool GetClipBox(FX_RECT* pRect) = 0; |
| 583 | 583 |
| 584 virtual FX_BOOL» GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, void
* pIccTransform = NULL, FX_BOOL bDEdge = FALSE) | 584 virtual bool» GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, void
* pIccTransform = NULL, bool bDEdge = false) |
| 585 { | 585 { |
| 586 return FALSE; | 586 return false; |
| 587 } | 587 } |
| 588 virtual CFX_DIBitmap* GetBackDrop() | 588 virtual CFX_DIBitmap* GetBackDrop() |
| 589 { | 589 { |
| 590 return NULL; | 590 return NULL; |
| 591 } | 591 } |
| 592 | 592 |
| 593 virtual FX_BOOL» SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color,
const FX_RECT* pSrcRect, | 593 virtual bool» SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color,
const FX_RECT* pSrcRect, |
| 594 int dest_left, int dest_top, int blend_type, | 594 int dest_left, int dest_top, int blend_type, |
| 595 int alpha_flag = 0, void* pIccTransform = NULL) =
0; | 595 int alpha_flag = 0, void* pIccTransform = NULL) =
0; |
| 596 | 596 |
| 597 virtual FX_BOOL» StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD col
or, int dest_left, int dest_top, | 597 virtual bool» StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD col
or, int dest_left, int dest_top, |
| 598 int dest_width, int dest_height, const FX_RECT
* pClipRect, FX_DWORD flags, | 598 int dest_width, int dest_height, const FX_RECT
* pClipRect, FX_DWORD flags, |
| 599 int alpha_flag = 0, void* pIccTransform = NULL
, int blend_type = FXDIB_BLEND_NORMAL) = 0; | 599 int alpha_flag = 0, void* pIccTransform = NULL
, int blend_type = FXDIB_BLEND_NORMAL) = 0; |
| 600 | 600 |
| 601 virtual FX_BOOL» StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alp
ha, FX_DWORD color, | 601 virtual bool» StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alp
ha, FX_DWORD color, |
| 602 const CFX_AffineMatrix* pMatrix, FX_DWORD flags,
void*& handle, | 602 const CFX_AffineMatrix* pMatrix, FX_DWORD flags,
void*& handle, |
| 603 int alpha_flag = 0, void* pIccTransform = NULL,
int blend_type = FXDIB_BLEND_NORMAL) = 0; | 603 int alpha_flag = 0, void* pIccTransform = NULL,
int blend_type = FXDIB_BLEND_NORMAL) = 0; |
| 604 | 604 |
| 605 virtual FX_BOOL» ContinueDIBits(void* handle, IFX_Pause* pPause) | 605 virtual bool» ContinueDIBits(void* handle, IFX_Pause* pPause) |
| 606 { | 606 { |
| 607 return FALSE; | 607 return false; |
| 608 } | 608 } |
| 609 | 609 |
| 610 virtual void CancelDIBits(void* handle) {} | 610 virtual void CancelDIBits(void* handle) {} |
| 611 | 611 |
| 612 virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, C
FX_Font* pFont, | 612 virtual bool DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_
Font* pFont, |
| 613 CFX_FontCache* pCache, const CFX_AffineMatrix
* pObject2Device, FX_FLOAT font_size, FX_DWORD color, | 613 CFX_FontCache* pCache, const CFX_AffineMatrix
* pObject2Device, FX_FLOAT font_size, FX_DWORD color, |
| 614 int alpha_flag = 0, void* pIccTransform = NUL
L) | 614 int alpha_flag = 0, void* pIccTransform = NUL
L) |
| 615 { | 615 { |
| 616 return FALSE; | 616 return false; |
| 617 } | 617 } |
| 618 | 618 |
| 619 virtual void* GetPlatformSurface() | 619 virtual void* GetPlatformSurface() |
| 620 { | 620 { |
| 621 return NULL; | 621 return NULL; |
| 622 } | 622 } |
| 623 | 623 |
| 624 virtual int GetDriverType() | 624 virtual int GetDriverType() |
| 625 { | 625 { |
| 626 return 0; | 626 return 0; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 639 }; | 639 }; |
| 640 class CPSFont; | 640 class CPSFont; |
| 641 class CFX_PSRenderer | 641 class CFX_PSRenderer |
| 642 { | 642 { |
| 643 public: | 643 public: |
| 644 | 644 |
| 645 CFX_PSRenderer(); | 645 CFX_PSRenderer(); |
| 646 | 646 |
| 647 ~CFX_PSRenderer(); | 647 ~CFX_PSRenderer(); |
| 648 | 648 |
| 649 void» » » Init(IFX_PSOutput* pOutput, int ps_level, int wi
dth, int height, FX_BOOL bCmykOutput); | 649 void» » » Init(IFX_PSOutput* pOutput, int ps_level, int wi
dth, int height, bool bCmykOutput); |
| 650 FX_BOOL» » » StartRendering(); | 650 bool» » » StartRendering(); |
| 651 void EndRendering(); | 651 void EndRendering(); |
| 652 | 652 |
| 653 void SaveState(); | 653 void SaveState(); |
| 654 | 654 |
| 655 void» » » RestoreState(FX_BOOL bKeepSaved = FALSE); | 655 void» » » RestoreState(bool bKeepSaved = false); |
| 656 | 656 |
| 657 void SetClip_PathFill(const CFX_PathData* pPathData, | 657 void SetClip_PathFill(const CFX_PathData* pPathData, |
| 658 const CFX_AffineMatrix* pObject2Device, | 658 const CFX_AffineMatrix* pObject2Device, |
| 659 int fill_mode | 659 int fill_mode |
| 660 ); | 660 ); |
| 661 | 661 |
| 662 void SetClip_PathStroke(const CFX_PathData* pPathData
, | 662 void SetClip_PathStroke(const CFX_PathData* pPathData
, |
| 663 const CFX_AffineMatrix* pObject2Device, | 663 const CFX_AffineMatrix* pObject2Device, |
| 664 const CFX_GraphStateData* pGraphState | 664 const CFX_GraphStateData* pGraphState |
| 665 ); | 665 ); |
| 666 | 666 |
| 667 FX_RECT GetClipBox() | 667 FX_RECT GetClipBox() |
| 668 { | 668 { |
| 669 return m_ClipBox; | 669 return m_ClipBox; |
| 670 } | 670 } |
| 671 | 671 |
| 672 FX_BOOL» » » DrawPath(const CFX_PathData* pPathData, | 672 bool» » » DrawPath(const CFX_PathData* pPathData, |
| 673 const CFX_AffineMatrix* pObject2Device, | 673 const CFX_AffineMatrix* pObject2Device, |
| 674 const CFX_GraphStateData* pGraphState, | 674 const CFX_GraphStateData* pGraphState, |
| 675 FX_DWORD fill_color, | 675 FX_DWORD fill_color, |
| 676 FX_DWORD stroke_color, | 676 FX_DWORD stroke_color, |
| 677 int fill_mode, | 677 int fill_mode, |
| 678 int alpha_flag = 0, | 678 int alpha_flag = 0, |
| 679 void* pIccTransform = NULL | 679 void* pIccTransform = NULL |
| 680 ); | 680 ); |
| 681 | 681 |
| 682 FX_BOOL» » » SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD
color, int dest_left, int dest_top, | 682 bool» » » SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD
color, int dest_left, int dest_top, |
| 683 int alpha_flag = 0, void* pIccTransform = NULL); | 683 int alpha_flag = 0, void* pIccTransform = NULL); |
| 684 | 684 |
| 685 FX_BOOL» » » StretchDIBits(const CFX_DIBSource* pBitmap, FX_D
WORD color, int dest_left, int dest_top, | 685 bool» » » StretchDIBits(const CFX_DIBSource* pBitmap, FX_D
WORD color, int dest_left, int dest_top, |
| 686 int dest_width, int dest_height, FX_DWORD flag
s, | 686 int dest_width, int dest_height, FX_DWORD flag
s, |
| 687 int alpha_flag = 0, void* pIccTransform = NULL
); | 687 int alpha_flag = 0, void* pIccTransform = NULL
); |
| 688 | 688 |
| 689 FX_BOOL» » » DrawDIBits(const CFX_DIBSource* pBitmap, FX_DWOR
D color, | 689 bool» » » DrawDIBits(const CFX_DIBSource* pBitmap, FX_DWOR
D color, |
| 690 const CFX_AffineMatrix* pMatrix, FX_DWORD flags, | 690 const CFX_AffineMatrix* pMatrix, FX_DWORD flags, |
| 691 int alpha_flag = 0, void* pIccTransform = NULL); | 691 int alpha_flag = 0, void* pIccTransform = NULL); |
| 692 | 692 |
| 693 FX_BOOL» » » DrawText(int nChars, const FXTEXT_CHARPOS* pChar
Pos, CFX_Font* pFont, CFX_FontCache* pCache, | 693 bool» » » DrawText(int nChars, const FXTEXT_CHARPOS* pChar
Pos, CFX_Font* pFont, CFX_FontCache* pCache, |
| 694 const CFX_AffineMatrix* pObject2Device, FX_FLOAT fo
nt_size, FX_DWORD color, | 694 const CFX_AffineMatrix* pObject2Device, FX_FLOAT fo
nt_size, FX_DWORD color, |
| 695 int alpha_flag = 0, void* pIccTransform = NULL); | 695 int alpha_flag = 0, void* pIccTransform = NULL); |
| 696 private: | 696 private: |
| 697 | 697 |
| 698 IFX_PSOutput* m_pOutput; | 698 IFX_PSOutput* m_pOutput; |
| 699 | 699 |
| 700 int m_PSLevel; | 700 int m_PSLevel; |
| 701 | 701 |
| 702 CFX_GraphStateData m_CurGraphState; | 702 CFX_GraphStateData m_CurGraphState; |
| 703 | 703 |
| 704 FX_BOOL» » » m_bGraphStateSet; | 704 bool» » » m_bGraphStateSet; |
| 705 | 705 |
| 706 FX_BOOL» » » m_bCmykOutput; | 706 bool» » » m_bCmykOutput; |
| 707 | 707 |
| 708 FX_BOOL» » » m_bColorSet; | 708 bool» » » m_bColorSet; |
| 709 | 709 |
| 710 FX_DWORD m_LastColor; | 710 FX_DWORD m_LastColor; |
| 711 | 711 |
| 712 FX_RECT m_ClipBox; | 712 FX_RECT m_ClipBox; |
| 713 | 713 |
| 714 CFX_ArrayTemplate<CPSFont*> m_PSFontList; | 714 CFX_ArrayTemplate<CPSFont*> m_PSFontList; |
| 715 | 715 |
| 716 CFX_ArrayTemplate<FX_RECT> m_ClipBoxStack; | 716 CFX_ArrayTemplate<FX_RECT> m_ClipBoxStack; |
| 717 FX_BOOL» » » m_bInited; | 717 bool» » » m_bInited; |
| 718 | 718 |
| 719 void OutputPath(const CFX_PathData* pPathData, const
CFX_AffineMatrix* pObject2Device); | 719 void OutputPath(const CFX_PathData* pPathData, const
CFX_AffineMatrix* pObject2Device); |
| 720 | 720 |
| 721 void SetGraphState(const CFX_GraphStateData* pGraphSt
ate); | 721 void SetGraphState(const CFX_GraphStateData* pGraphSt
ate); |
| 722 | 722 |
| 723 void SetColor(FX_DWORD color, int alpha_flag, void* p
IccTransform); | 723 void SetColor(FX_DWORD color, int alpha_flag, void* p
IccTransform); |
| 724 | 724 |
| 725 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, CFX_F
ont* pFont, const FXTEXT_CHARPOS& charpos, int& ps_fontnum, int &ps_glyphindex); | 725 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, CFX_F
ont* pFont, const FXTEXT_CHARPOS& charpos, int& ps_fontnum, int &ps_glyphindex); |
| 726 | 726 |
| 727 void WritePSBinary(const uint8_t* data, int len); | 727 void WritePSBinary(const uint8_t* data, int len); |
| 728 }; | 728 }; |
| 729 | 729 |
| 730 #endif // CORE_INCLUDE_FXGE_FX_GE_H_ | 730 #endif // CORE_INCLUDE_FXGE_FX_GE_H_ |
| OLD | NEW |