This is a GameMaker project where you pass in 2 images into a shader as well as a start angle and an end angle. It will then switch between which image is drawn, the first image will be drawn on parts between the angle and the second image will be drawn outside the angle.
Would be perfect for drawing pie charts but also has lots of utility.
One other thing that looks easy but isnt trivial is it works when the images are on different texture pages, are different sizes, and the whole thing can be scaled or rotated.