Source/WebKit/efl/ewk/ewk_view.cpp
Eina_Bool ewk_view_paint(Ewk_View_Private_Data* priv, cairo_t* cr, const Eina_Rectangle* area)
{
    EINA_SAFETY_ON_NULL_RETURN_VAL(priv, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(cr, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(area, EINA_FALSE);
    WebCore::FrameView* view = priv->main_frame->view();
    EINA_SAFETY_ON_NULL_RETURN_VAL(view, EINA_FALSE);

    if (view->needsLayout())
        view->forceLayout();
    WebCore::GraphicsContext gc(cr);
    WebCore::IntRect rect(area->x, area->y, area->w, area->h);

    cairo_save(cr);
    gc.save();
    gc.clip(rect);
    if (view->isTransparent())
        gc.clearRect(rect);
    view->paint(&gc,  rect);
    gc.restore();
    cairo_restore(cr);

    return EINA_TRUE;
}
/**
 * Paint using given graphics context the given area.
 *
 * This uses viewport relative area and will also handle scrollbars
 * and other extra elements. See ewk_view_paint_contents() for the
 * alternative function.
 *
 * @param priv private handle pointer of view to use as paint source.
 * @param cr cairo context to use as paint destination. Its state will
 *        be saved before operation and restored afterwards.
 * @param area viewport relative geometry to paint.
 *
 * @return @c EINA_TRUE on success and @c EINA_FALSE on failure, like
 *         incorrect parameters.
 *
 * @note this is an easy to use version, but internal structures are
 *       always created, then graphics context is clipped, then
 *       painted, restored and destroyed. This might not be optimum,
 *       so using #Ewk_View_Paint_Context may be a better solutions
 *       for large number of operations.
 *
 * @see ewk_view_paint_contents()
 * @see ewk_view_paint_context_paint()
 *
 * @note this is not for general use but just for subclasses that want
 *       to define their own backing store.
 */
Paint using given graphics context the given area.
This uses viewport relative area and will also handle scrollbars
and other extra elements. See ewk_view_paint_contents() for the
alternative function.

@param priv private handle pointer of view to use as paint source.
@param cr cairo context to use as paint destination. Its state will
be saved before operation and restored afterwards.
@param area viewport relative geometry to paint.

@return @c EINA_TRUE on success and @c EINA_FALSE on failure, like
incorrect parameters.

@note this is an easy to use version, but internal structures are
always created, then graphics context is clipped, then
painted, restored and destroyed. This might not be optimum,
so using #Ewk_View_Paint_Context may be a better solutions
for large number of operations.



@note this is not for general use but just for subclasses that want
to define their own backing store.
Paint using given graphics context the given area . This uses viewport relative area and will also handle scrollbars and other extra elements . See ewk_view_paint_contents () for the alternative function . @param priv private handle pointer of view to use as paint source . @param cr cairo context to use as paint destination . Its state will be saved before operation and restored afterwards . @param area viewport relative geometry to paint . @return @c EINA_TRUE on success and @c EINA_FALSE on failure like incorrect parameters . @note this is an easy to use version but internal structures are always created then graphics context is clipped then painted restored and destroyed . This might not be optimum so using #Ewk_View_Paint_Context may be a better solutions for large number of operations . @note this is not for general use but just for subclasses that want to define their own backing store .
Eina_Bool ewk_view_paint(Ewk_View_Private_Data* priv, cairo_t* cr, const Eina_Rectangle* area)
{
    EINA_SAFETY_ON_NULL_RETURN_VAL(priv, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(cr, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(area, EINA_FALSE);
    WebCore::FrameView* view = priv->main_frame->view();
    EINA_SAFETY_ON_NULL_RETURN_VAL(view, EINA_FALSE);
    if (view->needsLayout())
        view->forceLayout();
    WebCore::GraphicsContext gc(cr);
    WebCore::IntRect rect(area->x, area->y, area->w, area->h);
    cairo_save(cr);
    gc.save();
    gc.clip(rect);
    if (view->isTransparent())
        gc.clearRect(rect);
    view->paint(&gc,  rect);
    gc.restore();
    cairo_restore(cr);
    return EINA_TRUE;
}
Eina_Bool ewk_view_paint ( Ewk_View_Private_Data * priv , cairo_t * cr , const Eina_Rectangle * area ) { EINA_SAFETY_ON_NULL_RETURN_VAL ( priv , EINA_FALSE ) ; EINA_SAFETY_ON_NULL_RETURN_VAL ( cr , EINA_FALSE ) ; EINA_SAFETY_ON_NULL_RETURN_VAL ( area , EINA_FALSE ) ; WebCore :: FrameView * view = priv -> main_frame -> view ( ) ; EINA_SAFETY_ON_NULL_RETURN_VAL ( view , EINA_FALSE ) ; if ( view -> needsLayout ( ) ) view -> forceLayout ( ) ; WebCore :: GraphicsContext gc ( cr ) ; WebCore :: IntRect rect ( area -> x , area -> y , area -> w , area -> h ) ; cairo_save ( cr ) ; gc . save ( ) ; gc . clip ( rect ) ; if ( view -> isTransparent ( ) ) gc . clearRect ( rect ) ; view -> paint ( & gc , rect ) ; gc . restore ( ) ; cairo_restore ( cr ) ; return EINA_TRUE ; }
Paint using given graphics context the given area.
Paint using given graphics context the given area .