Q. SurfaceView Zoom 하는 방법이 따로 있나요?= 1.0f,
mScaleY = 1.0f,
mMaxZoomLimit = 2.0f,
mMinZoomLimit = 1.0f;
public static int
offset = 0, duration = 100;
@Override
public boolean onTouchEvent(MotionEvent event)
{
if(CmdStatus.GetFuncState(CmdStatus.FuncZOOM) != 0) {
touchToZoom(event, event.getX(), event.getY());
}
return true;
}
void touchToZoom(MotionEvent e, float x, float y)
{
int _ZoomControll = e.getAction();
switch(_ZoomControll) {
case MotionEvent.ACTION_DOWN:
mZoomIn(mGLSurfaceView, x, y);
break;
}
}
void mZoomIn(View v, float x, float y)
{
if (mScaleX < mMaxZoomLimit && mScaleY < mMaxZoomLimit)
{
Animation animation = new ScaleAnimation(mScaleX, (mScaleX + 1.0f), mScaleY, (mScaleY + 1.0f), x, y);
mScaleX += 1.0f;
mScaleY += 1.0f;
animation.setInterpolator(new DecelerateInterpolator());
animation.setDuration(duration);
animation.setStartOffset(offset);
animation.setFillAfter(true);
v.startAnimation(animation);
}
}
현재 SurfaceView 안에서 이런식으로 Zoom을 작동시키고 있습니다. 물론 제대로 작동 하지 않구요. 무언가 SurfaceView는 다른 Zoom 방법이 있는건가요? 참고할만한 사이트를 알려주셨으면 합니다.하나 더 질문드리자면, 이 Zoom 그냥 화면을 늘리는 것인데 이걸 화면이 늘어지는 게 아닌 별도의 레이아웃 창에 Zoom 된 화면을 띄우는 방법이 있나요?