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

    cairo_t* cr = platformContext()->cr();
    cairo_save(cr);

    if (fillColor().alpha())
        fillRectSourceOver(cr, rect, fillColor());

    if (strokeStyle() != NoStroke) {
        setSourceRGBAFromColor(cr, strokeColor());
        FloatRect r(rect);
        r.inflate(-.5f);
        cairo_rectangle(cr, r.x(), r.y(), r.width(), r.height());
        cairo_set_line_width(cr, 1.0);
        cairo_stroke(cr);
    }

    cairo_restore(cr);
}
// Draws a filled rectangle with a stroked border.
Draws a filled rectangle with a stroked border.
Draws a filled rectangle with a stroked border .
void GraphicsContext::drawRect(const IntRect& rect)
{
    if (paintingDisabled())
        return;
    cairo_t* cr = platformContext()->cr();
    cairo_save(cr);
    if (fillColor().alpha())
        fillRectSourceOver(cr, rect, fillColor());
    if (strokeStyle() != NoStroke) {
        setSourceRGBAFromColor(cr, strokeColor());
        FloatRect r(rect);
        r.inflate(-.5f);
        cairo_rectangle(cr, r.x(), r.y(), r.width(), r.height());
        cairo_set_line_width(cr, 1.0);
        cairo_stroke(cr);
    }
    cairo_restore(cr);
}
void GraphicsContext :: drawRect ( const IntRect & rect ) { if ( paintingDisabled ( ) ) return ; cairo_t * cr = platformContext ( ) -> cr ( ) ; cairo_save ( cr ) ; if ( fillColor ( ) . alpha ( ) ) fillRectSourceOver ( cr , rect , fillColor ( ) ) ; if ( strokeStyle ( ) != NoStroke ) { setSourceRGBAFromColor ( cr , strokeColor ( ) ) ; FloatRect r ( rect ) ; r . inflate ( -.5f ) ; cairo_rectangle ( cr , r . x ( ) , r . y ( ) , r . width ( ) , r . height ( ) ) ; cairo_set_line_width ( cr , 1.0 ) ; cairo_stroke ( cr ) ; } cairo_restore ( cr ) ; }
Draws a filled rectangle with a stroked border.
Draws a filled rectangle with a stroked border .