summaryrefslogtreecommitdiff
path: root/core/fxge/win32
diff options
context:
space:
mode:
authorcaryclark <caryclark@google.com>2016-03-25 14:08:26 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-25 14:08:26 -0700
commit342f6fa66f6d843fe07d9b6a133656f83c8d62f6 (patch)
treea87e4ca21ea2d4444d98cd0ce28001de9925fa7a /core/fxge/win32
parent46c8b1e3202ab5ae3663141dc25bec3b4360322e (diff)
downloadpdfium-342f6fa66f6d843fe07d9b6a133656f83c8d62f6.tar.xz
support gradients and stroke+fill
To draw paths that are stroked and filled with a pair of colors, reduce the fill by the width of the stroke. This is implemented with path ops subtracting the resolved stroke shape from the fill shape. This permits rendering the result without requiring an offscreen bitmap. The implementation for stroke+fill requires a new entry into the graphics engine, so a bit was added to device caps for that. Extract the gradient information out of the axial gradient function descriptions, and when possible, use Skia to draw the linear gradient directly. This requires making the function descriptions non-opaque, and adding a bit to device caps for another entry into the graphics engine. BUG= Review URL: https://codereview.chromium.org/1828283002
Diffstat (limited to 'core/fxge/win32')
-rw-r--r--core/fxge/win32/win32_int.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h
index 923aa84f33..d903d3abf5 100644
--- a/core/fxge/win32/win32_int.h
+++ b/core/fxge/win32/win32_int.h
@@ -145,7 +145,7 @@ class CGdiDeviceDriver : public IFX_RenderDeviceDriver {
void* pIccTransform,
int blend_type) override;
FX_BOOL GetClipBox(FX_RECT* pRect) override;
- void* GetPlatformSurface() override { return (void*)m_hDC; }
+ void* GetPlatformSurface() const override { return (void*)m_hDC; }
virtual void* GetClipRgn();
virtual FX_BOOL SetClipRgn(void* pRgn);
@@ -352,7 +352,7 @@ class CPSPrinterDriver : public IFX_RenderDeviceDriver {
FX_DWORD color,
int alpha_flag,
void* pIccTransform) override;
- void* GetPlatformSurface() override { return (void*)m_hDC; }
+ void* GetPlatformSurface() const override { return (void*)m_hDC; }
HDC m_hDC;
FX_BOOL m_bCmykOutput;