Tuesday, February 15, 2011

Scribbling 3.0 Style

Just a quick update. Got a little farther with the samples the last couple evenings. Fixed up a few bugs causing some issues with a couple of the ones that already build, like native-instantiation.exe. Then I tore into Scribble.cs.

It was originally ported from a gtk example back in the early days. It may have been before we really had much subclassing support in Gtk#. I decided to see if gtk+ was still shipping the sample, and just do a clean port of the current sample instead of trying a minimal update.

The majority of the work needed to port the old sample to 3.0 boiled down to a Gdk.Pixmap to Cairo.Surface port. The ExposeEvent to Drawn event transition was needed as well. This is starting to sound a bit like a broken record, though I would imagine many readers have never heard a broken record.

But I digress.

The finished port of the gtk+ sample is now in master, along with all the fixes to the stack to expose some needed API that wasn't getting generated. The list of non-working samples is getting shorter.


mdi said...

Any new lessons for the porting tutorial on the Wiki?

reviczky said...

You forgot the Cairo Dispose calls as described in: http://www.mono-project.com/Mono.Cairo