I encountered this with the Cairo Graphics library. They do have very basic tutorials, but nothing that covers the advanced functions. Any graphics library/API should show the desired output alongside the code since a picture is worth a thousand words.
:P The best example of this I have encountered is Postscript: A Visual Approach
. The book's examples showed the source code on the left page and the actual output of the code on the right page. The book also did a good job of explaining how coordinate transforms work, something that is important when dealing with vector graphics.