I'm writing a program for my algebra students to practice integers.
Stuff like....
3-6
-4 + (-5)
3(-4)
-15 ÷ 3
etc.

I want to show an explanation and for the addition and subtraction, I want to show it on a number line. For example, if the problem is 3 - 7, the number line should show and arrow to that goes right to 3, and then left 7 units (starting from 3). Then the student can see that the answer is -4.

I could probably do this with some string manipulation, but what would be the easiest way to do it in a picture format? Maybe a bitmap.