Reduce memory consumption by using Arc<PaintSource> instead of cloning.
Arc<PaintSource>
Reduce code size of shapes.rs.