2
我知道如何用drawTexturePath將任意角度的BlackBerry Bitmap圖像旋轉。但是,旋轉錨點位於圖像的左上角。如何將錨點移動到圖像的中心?BlackBerry drawTexturedPath旋轉將錨點移至圖像的中心
該代碼使用Graphics.drawTexturedPath繞左上角旋轉:
int[] x = new int[] {0, width, width, 0};
int[] y = new int[] {0, 0, height, height};
int angle32 = Fixed32.toFP(angleDegrees);
int dux = Fixed32.cosd(angle32);
int dvx = -Fixed32.sind(angle32);
int duy = Fixed32.sind(angle32);
int dvy = Fixed32.cosd(angle32);
graphics.drawTexturedPath(x, y, null, null, 0, 0, dvx, dux, dvy, duy, bitmapImage);
如何修改這個代碼,以圍繞圖像與drawTexturedPath(http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/Graphics.html#drawTexturedPath)的中心旋轉?如果您有任何疑問,請聯繫我們,我們將盡快與您聯繫。
-Thanks提前,大衛Pixelmonks.com
您能否提供一組圖像示例以更好地說明旋轉行爲? – Zecas 2012-05-31 16:27:35