AudioThumbnail with customised look


If I want to have an AudioThumbnail with a customised look, how would I go about it?

In this case I want to have the wave form shown with strokes on the edges instead of uniformly filled.

Of course I can subclass AudioThumbnail and copy & paste & change the code that draws the wave form in the subclass, but I thought there should be a better way?

I was looking at the Graphics class in which the AudioThumbnail draws, but unfortunately none of its methods are virtual, so overriding fillRectList there is not an option either.

Any ideas?


Yes, it's a tricky place to allow customisation because it's all very performance-critical.. If you can suggest changes we could make that would make it possible for you to do what you need without compromising performance, then I'd be happy to consider it!


Why not have the Graphics class have more virtual methods? It would allow to create a ThumbnailGraphics class that inherits from Graphics and overrides some functions, like for example fillRectList.


The implementation of the graphics class is completely swappable via the LowLevelGraphicsContext class, but it'd be a really inappropriate place for customising something like this! There's probably a virtual method that could added to the thumbnail class which could open it up to efficient custom renderers, but it'd take some careful designing to get it right.