freehand draw problem
-
Hi, I'm currently having a big problem with freehand drawing. I want to do the following thing: I want to draw 2 freehand lines both with different colors and I need the final line to be on the top of the other lines created before. To store the lines I use 2 GraphicsPath objects, one GraphicsPath per color. I tried to solve this problem by using two arrays like this: Public MousePath0() As System.Drawing.Drawing2D.GraphicsPath Public MousePath1() As System.Drawing.Drawing2D.GraphicsPath My idea was to make a system which will remember the order of all lines and draw them correctly, but when I add an graphics path to the array and when I try to add line to this graphics path VB 2008 gives me an error "Object reference not set to an instance of an object." Please help, I don't want to use exactly a GraphicsPath for the lines, it can be something different. Thank you!