"How many Chinese characters know" "Development Zhizhi (1)

xiaoxiao2021-03-06  65

The collapse is positively transmitted to a small example of a small example of being experimenting. The original program is to display a dynamically scrolling starry sky by calling Timertask and Timer. The ME combines the principle ready to make a random display Chinese character. How many Chinese characters are used to test, sweat (not knowing too much)! Because the routine is "." To simulate the stars, there is no superimposed coincidence, but the space for each Chinese character is obviously greater than that "." The space occupied by the "." . This is not.

Think of the first two days of browsing the MIDP, the CLDC's API seems to see the Font class to get the character and string occupancy space (in pixel), as well, can not, huh, huh. Tested in the simulator, the width and high of each Chinese character in Motorola A388 are 24, while the English characters are 12, high is also 24; in Motoi85S, the Chinese characters are 11, high 12, English characters The width is 8, which is 12. In the case, the highness of the character should be the same for a particular machine, because Font only provides a function of getHeight, and the values ​​that are definitely only one! Test Face, Size and Style are 0, name is Style_Plain, Face_System. Another problem is to set it to 100 milliseconds, the screen display is unstable when testing on the Motorola A388. By testing, the result of the emulator display is that it does not support DoubleBuffered.

Therefore, it is now necessary to solve two problems: First, the characters cannot overlap; second, the display is stable.

转载请注明原文地址:https://www.9cbs.com/read-110615.html

New Post(0)