Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
void GraphicsContext::drawEllipse(const IntRect& rect)
{
    if (paintingDisabled())
        return;

    cairo_t* cr = platformContext()->cr();
    cairo_save(cr);
    float yRadius = .5 * rect.height();
    float xRadius = .5 * rect.width();
    cairo_translate(cr, rect.x() + xRadius, rect.y() + yRadius);
    cairo_scale(cr, xRadius, yRadius);
    cairo_arc(cr, 0., 0., 1., 0., 2 * M_PI);
    cairo_restore(cr);

    if (fillColor().alpha()) {
        setSourceRGBAFromColor(cr, fillColor());
        cairo_fill_preserve(cr);
    }

    if (strokeStyle() != NoStroke) {
        setSourceRGBAFromColor(cr, strokeColor());
        cairo_set_line_width(cr, strokeThickness());
        cairo_stroke(cr);
    } else
        cairo_new_path(cr);
}
// This method is only used to draw the little circles used in lists.
This method is only used to draw the little circles used in lists.
This method is only used to draw the little circles used in lists .
void GraphicsContext::drawEllipse(const IntRect& rect)
{
    if (paintingDisabled())
        return;
    cairo_t* cr = platformContext()->cr();
    cairo_save(cr);
    float yRadius = .5 * rect.height();
    float xRadius = .5 * rect.width();
    cairo_translate(cr, rect.x() + xRadius, rect.y() + yRadius);
    cairo_scale(cr, xRadius, yRadius);
    cairo_arc(cr, 0., 0., 1., 0., 2 * M_PI);
    cairo_restore(cr);
    if (fillColor().alpha()) {
        setSourceRGBAFromColor(cr, fillColor());
        cairo_fill_preserve(cr);
    }
    if (strokeStyle() != NoStroke) {
        setSourceRGBAFromColor(cr, strokeColor());
        cairo_set_line_width(cr, strokeThickness());
        cairo_stroke(cr);
    } else
        cairo_new_path(cr);
}
void GraphicsContext :: drawEllipse ( const IntRect & rect ) { if ( paintingDisabled ( ) ) return ; cairo_t * cr = platformContext ( ) -> cr ( ) ; cairo_save ( cr ) ; float yRadius = .5 * rect . height ( ) ; float xRadius = .5 * rect . width ( ) ; cairo_translate ( cr , rect . x ( ) + xRadius , rect . y ( ) + yRadius ) ; cairo_scale ( cr , xRadius , yRadius ) ; cairo_arc ( cr , 0. , 0. , 1. , 0. , 2 * M_PI ) ; cairo_restore ( cr ) ; if ( fillColor ( ) . alpha ( ) ) { setSourceRGBAFromColor ( cr , fillColor ( ) ) ; cairo_fill_preserve ( cr ) ; } if ( strokeStyle ( ) != NoStroke ) { setSourceRGBAFromColor ( cr , strokeColor ( ) ) ; cairo_set_line_width ( cr , strokeThickness ( ) ) ; cairo_stroke ( cr ) ; } else cairo_new_path ( cr ) ; }
This method is only used to draw the little circles used in lists.
This method is only used to draw the little circles used in lists .