protected internal override void DoDraw(SvgDrawContext context)
        {
            PdfCanvas cv = context.GetCurrentCanvas();

            cv.WriteLiteral("% ellipse\n");
            if (SetParameters())
            {
                cv.MoveTo(cx + rx, cy);
                DrawUtils.Arc(cx - rx, cy - ry, cx + rx, cy + ry, 0, 360, cv);
            }
        }
Esempio n. 2
0
        protected internal override void DoDraw(SvgDrawContext context)
        {
            PdfCanvas cv = context.GetCurrentCanvas();

            cv.WriteLiteral("% ellipse\n");
            if (SetParameters())
            {
                // Use double type locally to have better precision of the result after applying arithmetic operations
                cv.MoveTo((double)cx + (double)rx, cy);
                DrawUtils.Arc((double)cx - (double)rx, (double)cy - (double)ry, (double)cx + (double)rx, (double)cy + (double
                                                                                                                       )ry, 0, 360, cv);
            }
        }