From 73b492a5d775c05d8c186c8478d1003edfffd34c Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 14 Aug 2017 17:23:25 -0400 Subject: Remove CFDE_RenderDevice This CL removes CFDE_RenderDevice. For most of the proxy'd calls we call the CFX_RenderDevice directly now. To set the clip rect an overload was added to accept a CFX_RectF and handle the casting to FX_RECT. The one needed method, DrawString, is move to a static on CFDE_TextOut. Change-Id: I95ea7e1fa1fd4702074b797c06423c9c9cb51db9 Reviewed-on: https://pdfium-review.googlesource.com/10951 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- core/fxge/cfx_renderdevice.cpp | 7 +++++++ core/fxge/cfx_renderdevice.h | 1 + 2 files changed, 8 insertions(+) (limited to 'core') diff --git a/core/fxge/cfx_renderdevice.cpp b/core/fxge/cfx_renderdevice.cpp index 310a16512c..cb0e600916 100644 --- a/core/fxge/cfx_renderdevice.cpp +++ b/core/fxge/cfx_renderdevice.cpp @@ -471,6 +471,13 @@ bool CFX_RenderDevice::SetClip_PathStroke( return true; } +bool CFX_RenderDevice::SetClip_Rect(const CFX_RectF& rtClip) { + return SetClip_Rect(FX_RECT(static_cast(floor(rtClip.left)), + static_cast(floor(rtClip.top)), + static_cast(ceil(rtClip.right())), + static_cast(ceil(rtClip.bottom())))); +} + bool CFX_RenderDevice::SetClip_Rect(const FX_RECT& rect) { CFX_PathData path; path.AppendRect(rect.left, rect.bottom, rect.right, rect.top); diff --git a/core/fxge/cfx_renderdevice.h b/core/fxge/cfx_renderdevice.h index ad8e487749..1a69c42b14 100644 --- a/core/fxge/cfx_renderdevice.h +++ b/core/fxge/cfx_renderdevice.h @@ -123,6 +123,7 @@ class CFX_RenderDevice { bool SetClip_PathFill(const CFX_PathData* pPathData, const CFX_Matrix* pObject2Device, int fill_mode); + bool SetClip_Rect(const CFX_RectF& pRect); bool SetClip_Rect(const FX_RECT& pRect); bool SetClip_PathStroke(const CFX_PathData* pPathData, const CFX_Matrix* pObject2Device, -- cgit v1.2.3