summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-02-07 14:21:36 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-07 19:46:09 +0000
commit79365f7e3d2d62138e79e4403d4959318776c139 (patch)
treeb00196a8cdc6777ee0224653ef70bb2f2f7bb8b9 /core/fpdfapi/render
parentc222907f453e8a0e6376a86f89354eedb8285854 (diff)
downloadpdfium-79365f7e3d2d62138e79e4403d4959318776c139.tar.xz
Use enum class for PathPoint types.
This hopefully makes it less confusing what the description of a point is. Currently we have defines for the types, which is confusing because a point can only be one of the three. And it is mixed up with whether the point is closing a figure or not. Change-Id: Icd71355d69c77b3d52ca78e03bc379081ff87753 Reviewed-on: https://pdfium-review.googlesource.com/2552 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 35d061616b..8fe7a31ce4 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -816,9 +816,12 @@ void DrawCoonPatchMeshes(
patch.fill_mode = fill_mode;
patch.path.SetPointCount(13);
FX_PATHPOINT* pPoints = patch.path.GetPoints();
- pPoints[0].m_Flag = FXPT_MOVETO;
- for (int i = 1; i < 13; i++)
- pPoints[i].m_Flag = FXPT_BEZIERTO;
+ pPoints[0].m_Type = FXPT_TYPE::MoveTo;
+ pPoints[0].m_CloseFigure = false;
+ for (int i = 1; i < 13; i++) {
+ pPoints[i].m_Type = FXPT_TYPE::BezierTo;
+ pPoints[i].m_CloseFigure = false;
+ }
CFX_PointF coords[16];
int point_count = type == kTensorProductPatchMeshShading ? 16 : 12;
while (!stream.BitStream()->IsEOF()) {