Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
> ズームのために画像をスケーリングしています。その後、スケーリングされた画像をイメージビューの中心に配置したいと考えています。これどうやってするの??
imageview.setScaleType(ScaleType.MATRIX); savedMatrix.set(matrix); matrix.set(savedMatrix); matrix.setScale(.3f, .3f,screen_width/2,screen_height/2);
試す
matrix.postTranslate((screen_width-image_width)/2, (screen_height-image_height)/2);
ところで、なぜあなたはやっているのですか:
savedMatrix.set(matrix); matrix.set(savedMatrix);
マトリックスをsavedMatrixにディープコピーすると、それらは同一であるため、他の方法を実行する必要はありません。