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

Method vertex

renderers/agg/include/agg_conv_adaptor_vcgen.h:89–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 //------------------------------------------------------------------------
88 template<class VertexSource, class Generator, class Markers>
89 unsigned conv_adaptor_vcgen<VertexSource, Generator, Markers>::vertex(double* x, double* y)
90 {
91 unsigned cmd = path_cmd_stop;
92 bool done = false;
93 while(!done)
94 {
95 switch(m_status)
96 {
97 case initial:
98 m_markers.remove_all();
99 m_last_cmd = m_source->vertex(&m_start_x, &m_start_y);
100 m_status = accumulate;
101
102 case accumulate:
103 if(is_stop(m_last_cmd)) return path_cmd_stop;
104
105 m_generator.remove_all();
106 m_generator.add_vertex(m_start_x, m_start_y, path_cmd_move_to);
107 m_markers.add_vertex(m_start_x, m_start_y, path_cmd_move_to);
108
109 for(;;)
110 {
111 cmd = m_source->vertex(x, y);
112 if(is_vertex(cmd))
113 {
114 m_last_cmd = cmd;
115 if(is_move_to(cmd))
116 {
117 m_start_x = *x;
118 m_start_y = *y;
119 break;
120 }
121 m_generator.add_vertex(*x, *y, cmd);
122 m_markers.add_vertex(*x, *y, path_cmd_line_to);
123 }
124 else
125 {
126 if(is_stop(cmd))
127 {
128 m_last_cmd = path_cmd_stop;
129 break;
130 }
131 if(is_end_poly(cmd))
132 {
133 m_generator.add_vertex(*x, *y, cmd);
134 break;
135 }
136 }
137 }
138 m_generator.rewind(0);
139 m_status = generate;
140
141 case generate:
142 cmd = m_generator.vertex(x, y);
143 if(is_stop(cmd))
144 {
145 m_status = accumulate;
146 break;

Callers

nothing calls this directly

Calls 7

is_stopFunction · 0.85
is_vertexFunction · 0.85
is_move_toFunction · 0.85
is_end_polyFunction · 0.85
remove_allMethod · 0.45
add_vertexMethod · 0.45
rewindMethod · 0.45

Tested by

no test coverage detected