| 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 "xfa/src/fde/fde_gedevice.h" | 7 #include "xfa/fde/fde_gedevice.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 #include "xfa/src/fde/fde_brush.h" | 11 #include "xfa/fde/fde_brush.h" |
| 12 #include "xfa/src/fde/fde_devbasic.h" | 12 #include "xfa/fde/fde_devbasic.h" |
| 13 #include "xfa/src/fde/fde_geobject.h" | 13 #include "xfa/fde/fde_geobject.h" |
| 14 #include "xfa/src/fde/fde_image.h" | 14 #include "xfa/fde/fde_image.h" |
| 15 #include "xfa/src/fde/fde_pen.h" | 15 #include "xfa/fde/fde_pen.h" |
| 16 | 16 |
| 17 FX_BOOL FDE_GetStockHatchMask(int32_t iHatchStyle, CFX_DIBitmap& hatchMask) { | 17 FX_BOOL FDE_GetStockHatchMask(int32_t iHatchStyle, CFX_DIBitmap& hatchMask) { |
| 18 FDE_LPCHATCHDATA pData = FDE_DEVGetHatchData(iHatchStyle); | 18 FDE_LPCHATCHDATA pData = FDE_DEVGetHatchData(iHatchStyle); |
| 19 if (!pData) { | 19 if (!pData) { |
| 20 return FALSE; | 20 return FALSE; |
| 21 } | 21 } |
| 22 hatchMask.Create(pData->iWidth, pData->iHeight, FXDIB_1bppMask); | 22 hatchMask.Create(pData->iWidth, pData->iHeight, FXDIB_1bppMask); |
| 23 FXSYS_memcpy(hatchMask.GetBuffer(), pData->MaskBits, | 23 FXSYS_memcpy(hatchMask.GetBuffer(), pData->MaskBits, |
| 24 hatchMask.GetPitch() * pData->iHeight); | 24 hatchMask.GetPitch() * pData->iHeight); |
| 25 return TRUE; | 25 return TRUE; |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 dev.DrawCosmeticLine(pt0.x, pt0.y, pt1.x, pt1.y, cr0); | 564 dev.DrawCosmeticLine(pt0.x, pt0.y, pt1.x, pt1.y, cr0); |
| 565 pt1.x += dx; | 565 pt1.x += dx; |
| 566 pt0.y += dy; | 566 pt0.y += dy; |
| 567 a0 += da; | 567 a0 += da; |
| 568 r0 += dr; | 568 r0 += dr; |
| 569 g0 += dg; | 569 g0 += dg; |
| 570 b0 += db; | 570 b0 += db; |
| 571 } | 571 } |
| 572 return WrapTexture(pLinearBrush->GetWrapMode(), &bmp, pPath, pMatrix); | 572 return WrapTexture(pLinearBrush->GetWrapMode(), &bmp, pPath, pMatrix); |
| 573 } | 573 } |
| OLD | NEW |