手机上实现任意角度翻转算法[适用任何机型]
2008-01-05 08:50:43 来源:WEB开发网web2.0package rorate;
import javax.microedition.lcdui.Graphics;
/
* 图片任意角度翻转算法
* 同时实现了Nokia特有API
* author. BB
* SPRite.java
*
*
*/
public class Sprite {
/** SIN TABLE **/
public final static int SIN_TABLE[] =
{
0, 4, 8, 13, 17, 22, 26, 31, 35, 39,
44, 48, 53, 57, 61, 65, 70, 74, 78, 83,
87, 91, 95, 99, 103, 107, 111, 115, 119, 123,
127, 131, 135, 138, 142, 146, 149, 153, 156, 160,
163, 167, 170, 173, 177, 180, 183, 186, 189, 192,
195, 198, 200, 203, 206, 208, 211, 213, 216, 218,
220, 223, 225, 227, 229, 231, 232, 234, 236, 238,
239, 241, 242, 243, 245, 246, 247, 248, 249, 250,
251, 251, 252, 253, 253, 254, 254, 254, 254, 254,
255, 254, 254, 254, 254, 254, 253, 253, 252, 251,
251, 250, 249, 248, 247, 246, 245, 243, 242, 241,
239, 238, 236, 234, 232, 231, 229, 227, 225, 223,
220, 218, 216, 213, 211, 208, 206, 203, 200, 198,
195, 192, 189, 186, 183, 180, 177, 173, 170, 167,
163, 160, 156, 153, 149, 146, 142, 138, 135, 131,
127, 123, 119, 115, 111, 107, 103, 99, 95, 91,
87, 83, 78, 74, 70, 65, 61, 57, 53, 48,
44, 39, 35, 31, 26, 22, 17, 13, 8, 4,
0, -4, -8, -13, -17, -22, -26, -31, -35, -39,
-44, -48, -53, -57, -61, -65, -70, -74, -78, -83,
-87, -91, -95, -99, -103, -107, -111, -115, -119, -123,
-127, -131, -135, -138, -142, -146, -149, -153, -156, -160,
-163, -167, -170, -173, -177, -180, -183, -186, -189, -192,
-195, -198, -200, -203, -206, -208, -211, -213, -216, -218,
-220, -223, -225, -227, -229, -231, -232, -234, -236, -238,
赞助商链接