MFC depicts Taiji figure can use Pie for round filling, but how AGG can depict the semicircle, and then fill the semicircle, currently found Agg::ellipse can not be this big.
inline unsigned Ellipse::vertex (double* x, double* y)
{
if (M_step = = M_num)
{
++m_step;
return Path_cmd_end_poly | Path_flags_close | PATH_FLAGS_CCW;
}
if (M_step > M_num) return path_cmd_stop;
Double angle = double (m_step)/double (m_num) * 2.0 * PI;
if (M_CW) angle = 2.0 * Pi-angle;
*x = m_x + cos (angle) * M_RX;
*y = m_y + sin (angle) * M_RY;
m_step++;
Return ((M_step = = 1)? path_cmd_move_to:path_cmd_line_to);
}
currently even by modifying agg::ellipse 's function code as above:
To modify a row:
Double angle =double (m_step)/double (m_num) * 1.0 * PI;
Depict half the angle, just show semicircle!!
It is then able to depict a semicircle and fill, but here is a problem where the semicircular position needs to be adjusted and slightly rotated according to the center of the circle. Here's the problem:
The previous section has explained that the rotation of the rotate function for the Agg::trans_affine class is completely uncontrollable and does not know where to go!!!
Objective: We now need to populate ellipse to achieve the depiction of Taiji.