Re: [gnomemm] Overriding the draw_background signal from Gnome::Canvas::Canvas
- From: "r ve" <kaas_10 hotmail com>
- To: olau hardworking dk
- Cc: gnomemm-list gnome org
- Subject: Re: [gnomemm] Overriding the draw_background signal from Gnome::Canvas::Canvas
- Date: Fri, 31 Jan 2003 03:12:59 +0100
Quote: Ole Laursen
I think you meant
pCanvas->signal_draw_background()
.connect(SigC::slot(<mainwindowref>,
&MainWindow::on_draw_background));
where <mainwindowref> is probably *this if you're inside a member
function of MainWindow. The slot will then call the on_draw_background
member function of the reference.
If you want to transfer the canvas pointer, I suggest you store it
elsewhere in MainWindow (although it is possible to transfer it with
the binding mechanism).
Thanks, that's indeed what I meant and it works perfectly now.
(and I feel ashamed for making such a stupid mistake.. :)
Anyway, altough it does work now, the drawing routines do not work correctly
in some way..
When resizing the view with the canvas in it, or when dragging another
window on top of it flashes all the time (only with a black color) like
shown in the following screenshot (taken after doing a resize, the black
cube is not an item, it's drawn randomly):
http://home.quicknet.nl/qn/prive/rm.vaneijbergen/canvas.png
Setting a clipping rectangle doesn't help and the checkered pattern doesn't
show up at all (drawn using that render_background signal/method - the white
rectangle + orange outline is a canvas item) when using the anti aliased
canvas..
I'm draing the cubes from x,y to width,height (arguments from the
draw_background method).
When I'm drawing them from 0,0 I don't see any random black pieces, but I do
see random checkered pieces instead :)
Well, I'm probably doing something dumb again but I can't figure this one
out either :/
I guess I'll need some sleep before I start seeing what's wrong with it..
(it's 3:20am, not a good time to code.. altough I'm sure many people will
disagree ;)
Thanks,
Rich
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]