|
| | |||||||
| Tablet PC Developers Show off your work while discussing with others how to create ink enabled applications. |
| | LinkBack | Thread Tools |
| |||
| Bounding box for Ink I am trying to develop a ink box in C# that can be drawn in so a person can trace a letter (e.g the letter "a") however, even when I try to bound the box, if the person is holding down the mouse button and goes beyond the box, ink will continue to be drawn even though the user cannot see it. In case that not entirely clear, its more or less like you are writing on a piece of paper and you pen slips off of it, on paper you stop writing, in my program it continues to write. Even worse is that when I go to recognize what they have written all of the ink outside of the box will be recognized (i.e. if they wrote the letter "a" almost completely outside the box, it will still be recognized as the letter "a"). Can anyone help me out? Thanks! |
| |||
| Re: Bounding box for Ink You need to clip the ink. But you need to decide how you want this to work. If they drag outside the line and drag back in, should that be considered two separate strokes? Or should the points be constrained to the edge of the bounding box and the stroke be treated as a single stroke? You can achieve the latter using RealTimeStylus which has a bit of a learning curve but is a very powerful tool for accessing and manipulating the stylus data streams. If you just want to clip the ink (which may result in a "broken" stroke which appears as two strokes) you can use the Clip method of the Strokes class prior to sending the strokes to the recognizer. -- Josh Einstein (Tablet PC MVP) Einstein Technologies Tablet Enhancements for Outlook - Try it free: www.tabletoutlook.com "U of M GradMan" <UofMGradMan@discussions.microsoft.com> wrote in message news:BFA2D405-E490-491B-9AE9-1A770AC6F588@microsoft.com... >I am trying to develop a ink box in C# that can be drawn in so a person can > trace a letter (e.g the letter "a") however, even when I try to bound the > box, if the person is holding down the mouse button and goes beyond the > box, > ink will continue to be drawn even though the user cannot see it. In case > that not entirely clear, its more or less like you are writing on a piece > of > paper and you pen slips off of it, on paper you stop writing, in my > program > it continues to write. Even worse is that when I go to recognize what > they > have written all of the ink outside of the box will be recognized (i.e. if > they wrote the letter "a" almost completely outside the box, it will still > be > recognized as the letter "a"). Can anyone help me out? > > Thanks! |
| |||
| Re: Bounding box for Ink I am basically trying to not even allow them to write beyond the bounds of the box if there is a way to do that and if there isn't I would prefer the recognizer either disregard all ink outside the box or do as you said and count it as two separate strokes so the letter recognition comes up incorrect. "Josh Einstein" wrote: > You need to clip the ink. But you need to decide how you want this to work. > If they drag outside the line and drag back in, should that be considered > two separate strokes? Or should the points be constrained to the edge of the > bounding box and the stroke be treated as a single stroke? > > You can achieve the latter using RealTimeStylus which has a bit of a > learning curve but is a very powerful tool for accessing and manipulating > the stylus data streams. > > If you just want to clip the ink (which may result in a "broken" stroke > which appears as two strokes) you can use the Clip method of the Strokes > class prior to sending the strokes to the recognizer. > > -- > Josh Einstein (Tablet PC MVP) > Einstein Technologies > Tablet Enhancements for Outlook - Try it free: www.tabletoutlook.com > > > "U of M GradMan" <UofMGradMan@discussions.microsoft.com> wrote in message > news:BFA2D405-E490-491B-9AE9-1A770AC6F588@microsoft.com... > >I am trying to develop a ink box in C# that can be drawn in so a person can > > trace a letter (e.g the letter "a") however, even when I try to bound the > > box, if the person is holding down the mouse button and goes beyond the > > box, > > ink will continue to be drawn even though the user cannot see it. In case > > that not entirely clear, its more or less like you are writing on a piece > > of > > paper and you pen slips off of it, on paper you stop writing, in my > > program > > it continues to write. Even worse is that when I go to recognize what > > they > > have written all of the ink outside of the box will be recognized (i.e. if > > they wrote the letter "a" almost completely outside the box, it will still > > be > > recognized as the letter "a"). Can anyone help me out? > > > > Thanks! > |
| |||
| Re: Bounding box for Ink The only way to stop it is to use RealTimeStylus. Otherwise just allow it and clip it before you send it to the recognizer and then it will be treated as two strokes. Strokes allStrokes = myOverlay.Ink.Strokes; allStrokes.Clip(boundsInInkSpace); recoContext.Strokes = allStrokes; RecognitionStatus recoStatus; RecognitionResult result = recoContext.Recognize(out recoStatus); -- Josh Einstein (Tablet PC MVP) Einstein Technologies Tablet Enhancements for Outlook - Try it free: www.tabletoutlook.com "U of M GradMan" <UofMGradMan@discussions.microsoft.com> wrote in message news:69DB0C2A-4E92-4B70-9933-8FA91451CEFC@microsoft.com... >I am basically trying to not even allow them to write beyond the bounds of > the box if there is a way to do that and if there isn't I would prefer the > recognizer either disregard all ink outside the box or do as you said and > count it as two separate strokes so the letter recognition comes up > incorrect. > > "Josh Einstein" wrote: > >> You need to clip the ink. But you need to decide how you want this to >> work. >> If they drag outside the line and drag back in, should that be considered >> two separate strokes? Or should the points be constrained to the edge of >> the >> bounding box and the stroke be treated as a single stroke? >> >> You can achieve the latter using RealTimeStylus which has a bit of a >> learning curve but is a very powerful tool for accessing and manipulating >> the stylus data streams. >> >> If you just want to clip the ink (which may result in a "broken" stroke >> which appears as two strokes) you can use the Clip method of the Strokes >> class prior to sending the strokes to the recognizer. >> >> -- >> Josh Einstein (Tablet PC MVP) >> Einstein Technologies >> Tablet Enhancements for Outlook - Try it free: www.tabletoutlook.com >> >> >> "U of M GradMan" <UofMGradMan@discussions.microsoft.com> wrote in message >> news:BFA2D405-E490-491B-9AE9-1A770AC6F588@microsoft.com... >> >I am trying to develop a ink box in C# that can be drawn in so a person >> >can >> > trace a letter (e.g the letter "a") however, even when I try to bound >> > the >> > box, if the person is holding down the mouse button and goes beyond the >> > box, >> > ink will continue to be drawn even though the user cannot see it. In >> > case >> > that not entirely clear, its more or less like you are writing on a >> > piece >> > of >> > paper and you pen slips off of it, on paper you stop writing, in my >> > program >> > it continues to write. Even worse is that when I go to recognize what >> > they >> > have written all of the ink outside of the box will be recognized (i.e. >> > if >> > they wrote the letter "a" almost completely outside the box, it will >> > still >> > be >> > recognized as the letter "a"). Can anyone help me out? >> > >> > Thanks! >> |
| Bookmarks |
| Thread Tools | |
| |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |