MCPcopy Create free account
hub / github.com/MapServer/MapServer / vertex

Method vertex

renderers/agg/include/agg_conv_close_polygon.h:62–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 //------------------------------------------------------------------------
61 template<class VertexSource>
62 unsigned conv_close_polygon<VertexSource>::vertex(double* x, double* y)
63 {
64 unsigned cmd = path_cmd_stop;
65 for(;;)
66 {
67 if(m_vertex < 2)
68 {
69 *x = m_x[m_vertex];
70 *y = m_y[m_vertex];
71 cmd = m_cmd[m_vertex];
72 ++m_vertex;
73 break;
74 }
75
76 cmd = m_source->vertex(x, y);
77
78 if(is_end_poly(cmd))
79 {
80 cmd |= path_flags_close;
81 break;
82 }
83
84 if(is_stop(cmd))
85 {
86 if(m_line_to)
87 {
88 m_cmd[0] = path_cmd_end_poly | path_flags_close;
89 m_cmd[1] = path_cmd_stop;
90 m_vertex = 0;
91 m_line_to = false;
92 continue;
93 }
94 break;
95 }
96
97 if(is_move_to(cmd))
98 {
99 if(m_line_to)
100 {
101 m_x[0] = 0.0;
102 m_y[0] = 0.0;
103 m_cmd[0] = path_cmd_end_poly | path_flags_close;
104 m_x[1] = *x;
105 m_y[1] = *y;
106 m_cmd[1] = cmd;
107 m_vertex = 0;
108 m_line_to = false;
109 continue;
110 }
111 break;
112 }
113
114 if(is_vertex(cmd))
115 {
116 m_line_to = true;
117 break;
118 }
119 }

Callers

nothing calls this directly

Calls 4

is_end_polyFunction · 0.85
is_stopFunction · 0.85
is_move_toFunction · 0.85
is_vertexFunction · 0.85

Tested by

no test coverage detected