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

Method vertex

renderers/agg/src/agg_rounded_rect.cpp:105–160  ·  view source on GitHub ↗

--------------------------------------------------------------------

Source from the content-addressed store, hash-verified

103
104 //--------------------------------------------------------------------
105 unsigned rounded_rect::vertex(double* x, double* y)
106 {
107 unsigned cmd = path_cmd_stop;
108 switch(m_status)
109 {
110 case 0:
111 m_arc.init(m_x1 + m_rx1, m_y1 + m_ry1, m_rx1, m_ry1,
112 pi, pi+pi*0.5);
113 m_arc.rewind(0);
114 m_status++;
115
116 case 1:
117 cmd = m_arc.vertex(x, y);
118 if(is_stop(cmd)) m_status++;
119 else return cmd;
120
121 case 2:
122 m_arc.init(m_x2 - m_rx2, m_y1 + m_ry2, m_rx2, m_ry2,
123 pi+pi*0.5, 0.0);
124 m_arc.rewind(0);
125 m_status++;
126
127 case 3:
128 cmd = m_arc.vertex(x, y);
129 if(is_stop(cmd)) m_status++;
130 else return path_cmd_line_to;
131
132 case 4:
133 m_arc.init(m_x2 - m_rx3, m_y2 - m_ry3, m_rx3, m_ry3,
134 0.0, pi*0.5);
135 m_arc.rewind(0);
136 m_status++;
137
138 case 5:
139 cmd = m_arc.vertex(x, y);
140 if(is_stop(cmd)) m_status++;
141 else return path_cmd_line_to;
142
143 case 6:
144 m_arc.init(m_x1 + m_rx4, m_y2 - m_ry4, m_rx4, m_ry4,
145 pi*0.5, pi);
146 m_arc.rewind(0);
147 m_status++;
148
149 case 7:
150 cmd = m_arc.vertex(x, y);
151 if(is_stop(cmd)) m_status++;
152 else return path_cmd_line_to;
153
154 case 8:
155 cmd = path_cmd_end_poly | path_flags_close | path_flags_ccw;
156 m_status++;
157 break;
158 }
159 return cmd;
160 }
161
162

Callers

nothing calls this directly

Calls 3

is_stopFunction · 0.85
initMethod · 0.45
rewindMethod · 0.45

Tested by

no test coverage detected