예제 #1
0
        public virtual void  Visit(GraphicsPathIterator iterator)
        {
            if (iterator != null)
            {
                PointFP p0 = new PointFP();
                PointFP p1 = new PointFP();
                PointFP p2 = new PointFP();
                iterator.Begin();
                int j = 0;
                for (int i = 0; i < cmdsSize; i++)
                {
                    switch (cmds[i])
                    {
                    case CMD_NOP:
                        break;

                    case CMD_MOVETO:
                        iterator.MoveTo(pnts[j++]);
                        break;

                    case CMD_LINETO:
                        iterator.LineTo(pnts[j++]);
                        break;

                    case CMD_QCURVETO:
                        iterator.CurveTo(pnts[j++], pnts[j++]);
                        break;

                    case CMD_CCURVETO:
                        iterator.CurveTo(pnts[j++], pnts[j++], pnts[j++]);
                        break;

                    case CMD_CLOSE:
                        iterator.Close();
                        break;

                    default:
                        return;
                    }
                }
                iterator.End();
            }
        }