1. Technical Field
The present disclosure relates to handwriting input technology, and particularly to an apparatus and method for processing handwriting input.
2. Description of the Related Art
Touch screens are common in electronic devices, and some touch input devices include a touch panel and an input device, such as stylus, for inputting handwriting on the touch panel. The handwriting input by the input device is commonly stored in an image mode without any embellishment, and the size, the height, or the width of some characters of the input handwriting may be quite different from others, which result in impure format.
The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the disclosure. Moreover, in the drawing, like reference numerals designate corresponding parts throughout the several views.
Referring to
When the input device 20 touches the touch display unit 11 to input handwriting, the touch display control unit 13 detects a touched position on the touch display unit 11 in response to a character input operation by the input device 20. The processing unit 12 determines an input box 21 according to the touched position, and the touch display control unit 13 controls the touch display unit 11 to display the input box 21. The size of the input box 21 is smaller than that of the touch display unit 11. The touch display unit 11 includes a character displaying portion 23 including a plurality of rows, and each row has a fixed height.
When the touch display unit 11 displays the input box 21, the touch display control unit 13 determines a touch trace of the input device 20 in the input box 21 to determine a character corresponding to the touch trace. The touch display control unit 13 further determines a height and a width of an imaginary undisplayed rectangle sized to fittingly encircle the determined character.
The storage unit 15 further stores a predetermined height value, a fixed height RH of each row, and a predetermined width RW of each character displayed in each row of the character displaying portion 23. The character is resized by a predetermined scaling factor when displayed in the character displaying portion 23, so that the character can be received in one of the plurality of rows.
The calculating unit 14 obtains the height of the imaginary rectangle h, and determines whether the height of the imaginary rectangle h is smaller than the predetermined height value stored in the storage unit 15.
When the height of the imaginary rectangle h is smaller than the predetermined value, the calculating unit 14 further enlarges the height of the imaginary rectangle by adding a given value X to the height of the imaginary rectangle h. The processing unit 13 resizes the character displayed within the enlarged imaginary rectangle by a first scaling factor S. The touch display control unit 13 controls the touch display unit 11 to display the resized character in one of the rows of the character display portion 23. The first scaling factor S is calculated by the following formulas:
A=w/R
W;
B=(h+X)/RH;
If A<=B, S=A, and if A>B, S=B. Namely, the first scaling factor S is equal to the smaller one of w/RW and (h+X)/RH.
When the height of the imaginary rectangle h is not smaller than the predetermined height value, the processing unit 13 further resized the character displayed within the imaginary rectangle by a second scaling factor S′. The touch display control unit 13 controls the touch display unit 11 to display the resized character in one of the rows of the character display portion 23. The second scaling factor S′ is calculated by the following formulas:
A′=w/R
W;
B′=h/R
H;
If A′<=B′, S′=A′, and if A′>B′, S′=B′. Namely, the second scaling factor S′ is equal to a smaller one of w/RW and h/RH.
Referring to
In step S30, the touch display control unit 13 detects the touched position on the touch display unit 11 in response to a character input operation by the input device 20.
In step S31, the processing unit 12 determines an input box 21 according to the touched position, and the touch display control unit 13 controls the touch display unit 11 to display the input box 21.
The size of the input box is smaller than that of the touch display unit 11. The touch display unit 11 includes the character displaying portion 23 including a plurality of rows, and each row has a fixed height.
In step S32, the touch display control unit 13 determines a touch trace of the input device 20 in the input box 21 to determine a character corresponding to the touch trace, and further determines the height and the width of the imaginary undisplayed rectangle sized to fittingly encircle the determined character.
In step S33, the calculating unit 14 obtains the height of the imaginary rectangle h, and determines whether the height of the imaginary rectangle h is smaller than the predetermined height value. If yes, the procedure goes to step S34, otherwise, the step goes to step S37.
The storage unit 15 stores the predetermined height value, the fixed height RH of each row, and the predetermined width RW of each character displayed in each row of the character displaying portion 23.
In step S34, the calculating unit 14 further enlarges the height of the imaginary rectangle by adding a given value X to the height of the imaginary rectangle h.
In step S35, the processing unit 13 resizes the character displayed within the enlarged imaginary rectangle by a first scaling factor S.
The first scaling factor S is equal to w/RW and (h+X)/RH, whichever is smaller.
In step S36, the touch display control unit 13 controls the touch display unit 11 to display the resized character in one of the rows of the character display portion 23.
In step S37, the processing unit 15 further resized the character displayed within the imaginary rectangle by a second scaling factor S′. Then the procedure returns back to S36.
The second scaling factor S′ is equal to w/RW and h/RH, whichever is smaller.
It is understood that the present disclosure may be embodied in other forms without departing from the spirit thereof. Thus, the present examples and embodiments are to be considered in all respects as illustrative and not restrictive, and the disclosure is not to be limited to the details given herein.
Number | Date | Country | Kind |
---|---|---|---|
2012103239250 | Sep 2012 | CN | national |