Tablet Ink and GDI+
-
Hello, This week I was given something cool to do. Take a Tablet and Ink enable our Tiff viewing app. Sounded easy. This is what I have: 1 Microsoft.Ink.InkPicture inkPic, that I’m loading with inkPic.image = SomeTiffFromFile I’m not bothered by scaling problems yet. This control captures Ink and saves it as Strokes and it works wonderfully. I’m trying to save the Ink into the Tiff. This is what I have tried: First I bring the Tiff into Drawing.Bitmap bmp = Image.FromFile(“filename”) (this is the same file I use as the inkPic.Image) Then I make a new Graphic from the Bitmap. Since Ink is made of Points (Ink.Strokes[Foreach].GetPoints(Foreach)) I figured I could do this Graphics g = Graphics.FromImage(bmp); for (int i=0; i{ p = this.inkPicture1.Ink.Strokes[i].GetPoints(); foreach (Point x in p) { g.DrawLine(pen, x, x); } } bmp.Save(nameBase+".tif", System.Drawing.Imaging.ImageFormat.Tiff); But that isn’t working. I took the tmplate for this project from the PaperForm that came with the Tablet SDK. However it doesn’t save any thing and all the SDK examples that save save the Ink speratly from any image using Ink.ExtendedProperties.Add(guidImage, Gif); I need the Ink burnt into the Tiff as one document. Out prototype used a brush instead of Ink and it didn’t seem to work well. Too choppy. The InkPicture feels a lot nicer to use. Ps. Does any one know a good comprehensive book about handling Tiff with GDI+ Thank you for any feedback Ronald Hahn, CNT - Computer Engineering Technologist New Technologies Analyst HahnTech Affiliated With Code Constructors Edmonton, Alberta, Canada Email: rhahn@shaw.ca