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

Method vertex

mapagg.h:55–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54
55 virtual unsigned vertex(double* x, double* y)
56 {
57 if(m_point < m_pend)
58 {
59 /*here we treat the case where a real vertex is returned*/
60 bool first = m_point == m_line->point; /*is this the first vertex of a line*/
61 *x = m_point->x;
62 *y = m_point->y;
63 m_point++;
64 return first ? mapserver::path_cmd_move_to : mapserver::path_cmd_line_to;
65 }
66 /*if here, we're at the end of a line*/
67 m_line++;
68 *x = *y = 0.0;
69 if(m_line>=m_lend) /*is this the last line of the shapObj. normally,
70 (m_line==m_lend) should be a sufficient test, as the caller should not call
71 this function if a previous call returned path_cmd_stop.*/
72 return mapserver::path_cmd_stop; /*no more points to process*/
73
74 /*if here, there are more lines in the shapeObj, continue with next one*/
75 m_point=m_line->point; /*pointer to first point of next line*/
76 m_pend=&(m_line->point[m_line->numpoints]); /*pointer to after last point of next line*/
77
78 return vertex(x,y); /*this will return the first point of the next line*/
79 }
80private:
81 shapeObj *s;
82 lineObj *m_line, /*current line pointer*/

Callers 2

msRasterizeArcFunction · 0.45
msHatchPolygonFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected