| 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 #include "../../../include/fpdfapi/fpdf_render.h" | 7 #include "../../../include/fpdfapi/fpdf_render.h" |
| 8 #include "../../../include/fpdfapi/fpdf_pageobj.h" | 8 #include "../../../include/fpdfapi/fpdf_pageobj.h" |
| 9 #include "../../../include/fxge/fx_ge.h" | 9 #include "../../../include/fxge/fx_ge.h" |
| 10 #include "../fpdf_page/pageint.h" | 10 #include "../fpdf_page/pageint.h" |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 Coon_Color tempColors[2]; | 703 Coon_Color tempColors[2]; |
| 704 tempColors[0] = patch.patch_colors[flag]; | 704 tempColors[0] = patch.patch_colors[flag]; |
| 705 tempColors[1] = patch.patch_colors[(flag + 1) % 4]; | 705 tempColors[1] = patch.patch_colors[(flag + 1) % 4]; |
| 706 FXSYS_memcpy32(patch.patch_colors, tempColors, sizeof(Coon_Color) *
2); | 706 FXSYS_memcpy32(patch.patch_colors, tempColors, sizeof(Coon_Color) *
2); |
| 707 } | 707 } |
| 708 for (i = iStartPoint; i < point_count; i ++) { | 708 for (i = iStartPoint; i < point_count; i ++) { |
| 709 stream.GetCoords(coords[i].x, coords[i].y); | 709 stream.GetCoords(coords[i].x, coords[i].y); |
| 710 pObject2Bitmap->Transform(coords[i].x, coords[i].y); | 710 pObject2Bitmap->Transform(coords[i].x, coords[i].y); |
| 711 } | 711 } |
| 712 for (i = iStartColor; i < 4; i ++) { | 712 for (i = iStartColor; i < 4; i ++) { |
| 713 FX_FLOAT r, g, b; | 713 FX_FLOAT r=0.0f, g=0.0f, b=0.0f; |
| 714 stream.GetColor(r, g, b); | 714 stream.GetColor(r, g, b); |
| 715 patch.patch_colors[i].comp[0] = (FX_INT32)(r * 255); | 715 patch.patch_colors[i].comp[0] = (FX_INT32)(r * 255); |
| 716 patch.patch_colors[i].comp[1] = (FX_INT32)(g * 255); | 716 patch.patch_colors[i].comp[1] = (FX_INT32)(g * 255); |
| 717 patch.patch_colors[i].comp[2] = (FX_INT32)(b * 255); | 717 patch.patch_colors[i].comp[2] = (FX_INT32)(b * 255); |
| 718 } | 718 } |
| 719 CFX_FloatRect bbox = CFX_FloatRect::GetBBox(coords, point_count); | 719 CFX_FloatRect bbox = CFX_FloatRect::GetBBox(coords, point_count); |
| 720 if (bbox.right <= 0 || bbox.left >= (FX_FLOAT)pBitmap->GetWidth() || bbo
x.top <= 0 || | 720 if (bbox.right <= 0 || bbox.left >= (FX_FLOAT)pBitmap->GetWidth() || bbo
x.top <= 0 || |
| 721 bbox.bottom >= (FX_FLOAT)pBitmap->GetHeight()) { | 721 bbox.bottom >= (FX_FLOAT)pBitmap->GetHeight()) { |
| 722 continue; | 722 continue; |
| 723 } | 723 } |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 bStroke = FALSE; | 1084 bStroke = FALSE; |
| 1085 bPattern = TRUE; | 1085 bPattern = TRUE; |
| 1086 } | 1086 } |
| 1087 } | 1087 } |
| 1088 #ifdef _FPDFAPI_MINI_ | 1088 #ifdef _FPDFAPI_MINI_ |
| 1089 if (bPattern && m_DitherBits) { | 1089 if (bPattern && m_DitherBits) { |
| 1090 DitherObjectArea(pPathObj, pObj2Device); | 1090 DitherObjectArea(pPathObj, pObj2Device); |
| 1091 } | 1091 } |
| 1092 #endif | 1092 #endif |
| 1093 } | 1093 } |
| OLD | NEW |