summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/PWL_Utils.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-14 15:42:11 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-14 21:20:37 +0000
commit5f2d381028b2c09bd09a843368328155b1399c5e (patch)
tree39f0accddf4ba23fdff3f06c4b953137a4b68e36 /fpdfsdk/pdfwindow/PWL_Utils.h
parent7d4ccd7b5dd9ebb14e97ad35fb3bc093225b939a (diff)
downloadpdfium-5f2d381028b2c09bd09a843368328155b1399c5e.tar.xz
Replace CPWL_Point with CFX_PointFchromium/3013
The CPWL_Point is a subclass of CFX_PointF but adds no behaviour. Replacing with parent class. Change-Id: I5b971eb455a19c1e2bfebde86e4c8e2132bc62ad Reviewed-on: https://pdfium-review.googlesource.com/2654 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow/PWL_Utils.h')
-rw-r--r--fpdfsdk/pdfwindow/PWL_Utils.h34
1 files changed, 1 insertions, 33 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_Utils.h b/fpdfsdk/pdfwindow/PWL_Utils.h
index f6b51d7098..cbf54e6a90 100644
--- a/fpdfsdk/pdfwindow/PWL_Utils.h
+++ b/fpdfsdk/pdfwindow/PWL_Utils.h
@@ -9,21 +9,13 @@
#include "core/fpdfdoc/cpvt_wordrange.h"
#include "fpdfsdk/pdfwindow/PWL_Wnd.h"
+#include "fpdfsdk/pdfwindow/cpwl_pathdata.h"
class CFX_Edit;
class CFX_PathData;
struct CPWL_Color;
-template <class T>
-T PWL_MIN(const T& i, const T& j) {
- return ((i < j) ? i : j);
-}
-template <class T>
-T PWL_MAX(const T& i, const T& j) {
- return ((i > j) ? i : j);
-}
-
#define PWL_PDF2WIN(color) (uint8_t(color * 255))
#define PWL_WIN2PDF(color) ((FX_FLOAT)((FX_FLOAT)color / 255.0f))
@@ -74,32 +66,8 @@ T PWL_MAX(const T& i, const T& j) {
#define PPBL_LABELLEFTICONRIGHT 5
#define PPBL_LABELOVERICON 6
-class CPWL_Point : public CFX_PointF {
- public:
- CPWL_Point() {}
- CPWL_Point(FX_FLOAT fx, FX_FLOAT fy) : CFX_PointF(fx, fy) {}
- CPWL_Point(const CPWL_Point& point) : CFX_PointF(point.x, point.y) {}
-};
-
-enum PWL_PATHDATA_TYPE {
- PWLPT_MOVETO,
- PWLPT_LINETO,
- PWLPT_BEZIERTO,
- PWLPT_UNKNOWN
-};
-
enum PWL_PATH_TYPE { PWLPT_PATHDATA, PWLPT_STREAM };
-class CPWL_PathData {
- public:
- CPWL_PathData() : point(), type(PWLPT_UNKNOWN) {}
- CPWL_PathData(const CPWL_Point& pt, PWL_PATHDATA_TYPE tp)
- : point(pt), type(tp) {}
-
- CPWL_Point point;
- PWL_PATHDATA_TYPE type;
-};
-
class CPWL_Utils {
public:
static CFX_FloatRect InflateRect(const CFX_FloatRect& rcRect, FX_FLOAT fSize);