On Wednesday 13 March 2002 12:25 pm, Lars Gullik Bjønnes wrote:

> Index: Painter.h
> ===================================================================
>  private:
> +     /// For the figinset
> +     PainterBase & pixmap(int x, int y, int w, int h, Pixmap bitmap);
> +     

Errr, why? Helper functions are fine if they're used by more than one 
function but this is just daft. You've already proved to yourself that pixmap 
is used only with Painter.C, so now's the time to dump it.

Angus

        
PainterBase & Painter::pixmap(int x, int y, int w, int h, Pixmap bitmap)
{
        XGCValues val;
        val.function = GXcopy;
        GC gc = XCreateGC(display, owner.getPixmap(),
                          GCFunction, &val);
        XCopyArea(display, bitmap, owner.getPixmap(), gc,
                  0, 0, w, h, x, y);
        XFreeGC(display, gc);
        return *this;
}


PainterBase & Painter::image(int x, int y, int w, int h,
                            grfx::GImage const & image)
{
        return pixmap(x, y, w, h, image.getPixmap());
}


Reply via email to