summaryrefslogtreecommitdiff
path: root/xfa/fxgraphics
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxgraphics')
-rw-r--r--xfa/fxgraphics/cxfa_graphics.cpp35
-rw-r--r--xfa/fxgraphics/cxfa_graphics.h11
2 files changed, 3 insertions, 43 deletions
diff --git a/xfa/fxgraphics/cxfa_graphics.cpp b/xfa/fxgraphics/cxfa_graphics.cpp
index 47517309b7..d1e2f35c7e 100644
--- a/xfa/fxgraphics/cxfa_graphics.cpp
+++ b/xfa/fxgraphics/cxfa_graphics.cpp
@@ -154,9 +154,9 @@ void CXFA_Graphics::SetLineDash(float dashPhase,
}
}
-void CXFA_Graphics::SetLineDash(FX_DashStyle dashStyle) {
+void CXFA_Graphics::SetSolidLineDash() {
if (m_type == FX_CONTEXT_Device && m_renderDevice)
- RenderDeviceSetLineDash(dashStyle);
+ m_info.graphState.SetDashCount(0);
}
void CXFA_Graphics::SetLineWidth(float lineWidth) {
@@ -229,37 +229,6 @@ CFX_RenderDevice* CXFA_Graphics::GetRenderDevice() {
return m_renderDevice;
}
-void CXFA_Graphics::RenderDeviceSetLineDash(FX_DashStyle dashStyle) {
- switch (dashStyle) {
- case FX_DASHSTYLE_Solid: {
- m_info.graphState.SetDashCount(0);
- return;
- }
- case FX_DASHSTYLE_Dash: {
- float dashArray[] = {3, 1};
- SetLineDash(0, dashArray, 2);
- return;
- }
- case FX_DASHSTYLE_Dot: {
- float dashArray[] = {1, 1};
- SetLineDash(0, dashArray, 2);
- return;
- }
- case FX_DASHSTYLE_DashDot: {
- float dashArray[] = {3, 1, 1, 1};
- SetLineDash(0, dashArray, 4);
- return;
- }
- case FX_DASHSTYLE_DashDotDot: {
- float dashArray[] = {4, 1, 2, 1, 2, 1};
- SetLineDash(0, dashArray, 6);
- return;
- }
- default:
- return;
- }
-}
-
void CXFA_Graphics::RenderDeviceStrokePath(const CXFA_GEPath* path,
const CFX_Matrix* matrix) {
if (m_info.strokeColor.GetType() != CXFA_GEColor::Solid)
diff --git a/xfa/fxgraphics/cxfa_graphics.h b/xfa/fxgraphics/cxfa_graphics.h
index c8843bc87d..886bc45532 100644
--- a/xfa/fxgraphics/cxfa_graphics.h
+++ b/xfa/fxgraphics/cxfa_graphics.h
@@ -21,14 +21,6 @@ class CXFA_GEPath;
using FX_FillMode = int32_t;
-enum FX_DashStyle {
- FX_DASHSTYLE_Solid = 0,
- FX_DASHSTYLE_Dash = 1,
- FX_DASHSTYLE_Dot = 2,
- FX_DASHSTYLE_DashDot = 3,
- FX_DASHSTYLE_DashDotDot = 4
-};
-
enum class FX_HatchStyle {
Horizontal = 0,
Vertical = 1,
@@ -54,7 +46,7 @@ class CXFA_Graphics {
void SetLineCap(CFX_GraphStateData::LineCap lineCap);
void SetLineDash(float dashPhase, float* dashArray, int32_t dashCount);
- void SetLineDash(FX_DashStyle dashStyle);
+ void SetSolidLineDash();
void SetLineWidth(float lineWidth);
void EnableActOnDash();
void SetStrokeColor(const CXFA_GEColor& color);
@@ -82,7 +74,6 @@ class CXFA_Graphics {
CXFA_GEColor fillColor;
} m_info;
- void RenderDeviceSetLineDash(FX_DashStyle dashStyle);
void RenderDeviceStrokePath(const CXFA_GEPath* path,
const CFX_Matrix* matrix);
void RenderDeviceFillPath(const CXFA_GEPath* path,