The key problem with the code in my first post is that it renders all strokes the same. Even if they are selected. If you can tolerate this (it doesn't look too bad as you still get the selection frame), then go ahead and use that code.
But here's a better way...