2014년 11월 29일 토요일

Writing on Canvas

How do I smooth out handwriting on Canvas? I tried drawline like paintpot app but that is not good for wiriting on canvas. Any specific idea>



This discussion may help you:  https://groups.google.com/forum/#!searchin/mitappinventortest/draw$20canvas/mitappinventortest/b3u6-mMnCes/NNGdCpy6nXgJ  
depending on what you mean by smooth out handwriting.

The simple answer may be to use a stylus instead of a finger... you did not post any images about what you want to smooth.  Also, be aware, the resolution of Canvas is a minimum of one pixel; the size of a pixel may vary from device to device.  An issue is that a pixel is essentially a rectangle, one dimension is larger than another so, technically the line one draws is always a saw tooth.     You would have to write image processing routines in order to fool the users that the line is perfectly smooth..



Thank you.

I was thinking using draw point (insead of line) before. I want it to be triggered by clock - say 1 ms (or shortest possible time event). How can I capture CURRENT X and CURRENT Y every often clock timer triggers. 

may be that will looklike smooth handwriting?



It'll never look like smooth writing regardless of the interval on your timer... The phone/device is doing other things at the same time, and things get a priority from the operating system.  If the phone is busy doing other things, the writing will not be smooth.  1ms is just too short.  That means your app has to do something 1000 times a second, and it's just too much of a load on the device.


댓글 없음:

댓글 쓰기