Programming Windows D Examples are now Online!

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Jul 7 20:18:57 PDT 2011


I don't know where to post these things, so I'm putting it here.

So here I have a screenshot of an app that reads MIDI control changes
in realtime, and uses Cairo which draws into a GDI backbuffer to make
a visual output of the changes over time:
http://i.imgur.com/klwTa.png

The realtime MIDI input is stored as an array of values, and then
Cairo draws them by using straight lines.

Note how the lines are a little jagged? That's not because of Cairo,
it's due to my MIDI hardware which has a very low update rate. But
Cairo actually did a good job, it antialiased the points between the
changes and made the lines appear nicer. The result is a hell of a lot
better than what GDI can do.

Switching from pure win32 drawing to Cairo is a *breeze*. It's really
damn simple to use it. I do want to give Cairo's new OpenGL a try
though.


More information about the Digitalmars-d-announce mailing list