diff options
author | weili <weili@chromium.org> | 2016-12-12 10:21:19 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-12 10:21:19 -0800 |
commit | b1125f8daf52c750f6b642a343195c70f47f49f1 (patch) | |
tree | 52445831a25392c52ffb4374039a68535d32e180 /core/fxge/win32/win32_int.h | |
parent | 5dbb129eb0e9f2ba9f0b897fd0589ca28add195d (diff) | |
download | pdfium-b1125f8daf52c750f6b642a343195c70f47f49f1.tar.xz |
Fix dotted line drawing for GDI device driver
When GDI device driver draws a dotted line, it also clip the line
into the device context's bound before drawing. This CL includes
a couple fixes:
-- When this driver is used for EMF drawing, the drawing is not
bound to the device context so clipping is not needed;
-- Transformation needs to be applied before clipping since the
transformation may move the line into the bound;
-- While checking for out-of-bound flags, bit operations are needed
to make sure the discarded line is completely out of bound, not
partially inside the bound;
BUG=chromium:539533
Review-Url: https://codereview.chromium.org/2562533002
Diffstat (limited to 'core/fxge/win32/win32_int.h')
-rw-r--r-- | core/fxge/win32/win32_int.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h index fa1cc6830e..ae090b72d3 100644 --- a/core/fxge/win32/win32_int.h +++ b/core/fxge/win32/win32_int.h @@ -152,11 +152,7 @@ class CGdiDeviceDriver : public IFX_RenderDeviceDriver { bool GetClipBox(FX_RECT* pRect) override; void* GetPlatformSurface() const override; - void DrawLine(FX_FLOAT x1, - FX_FLOAT y1, - FX_FLOAT x2, - FX_FLOAT y2, - const CFX_Matrix* pMatrix); + void DrawLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2); bool GDI_SetDIBits(CFX_DIBitmap* pBitmap, const FX_RECT* pSrcRect, @@ -177,6 +173,7 @@ class CGdiDeviceDriver : public IFX_RenderDeviceDriver { uint32_t flags); HDC m_hDC; + bool m_bMetafileDCType; int m_Width; int m_Height; int m_nBitsPerPixel; |