我有一个关于同时操作缩放和旋转图像的查询..实际上我想使用TransformGestureEvent在as3中对图像应用旋转和缩放
You should use the Matrix class . Creating a variation from this post :
function rotateAndZoom (
ob:*,
angleDegrees:Number,
zoomAmt:Number,
ptRotationPoint:Point
) {
var m:Matrix = ob.transform.matrix;
m.tx -= ptRotationPoint.x;
m.ty -= ptRotationPoint.y;
m.rotate (angleDegrees*(Math.PI/180));
m.scale(zoomAmt, zoomAmt);
m.tx += ptRotationPoint.x;
m.ty += ptRotationPoint.y;
ob.transform.matrix = m;
}
Let me know if this solves the problem.
Check out gestures recognition library similar to Apple's UIGestureRecognizers https://github.com/fljot/Gestouch/tree/develop
Combined example here https://github.com/fljot/GestouchExamples/blob/develop/src/org/gestouch/examples/views/ConflictGesturesView.mxml
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.