GNOME Bugzilla – Bug 545321
paint() is not called when subclassing actor
Last modified: 2008-08-04 10:31:12 UTC
I tried to write my own actor, that inherits from actor, and override the paint function to paint my own stuff, but paint isn't called. Debugging it shows that do_paint is called, but base->paint isnt called from that because base is NULL. Can you give an example on how to inherit from actor the do my own paint function?
I think we'll need a simple test case in order to investigate whether this is a bug or not.
You are probably also the first person to try this with C++. I'd really like to have time to create C++ versions of all the examples in the clutter tutorial.
Created attachment 115545 [details] testcase.rar Test case that shows the problem, paint isnt called for a class that inherits from actor
I don't believe there is any paint() virtual function. Try paint_vfunc() instead, please, or generally look a the class heirarchy to see what virtual functions really exist. One way to check this is to call the base class's implementation of the virtual function, which you should often do anyway.
Thanks, using do_paint() actually worked, I guess what really is missing is documentation and examples.
I don't really understand what do_paint() is, but this seems to be resolved.