A Wavelet Based Curve Decomposition for On-line Handwriting