android - Matrix Translate Translating Incorrectly -
i working imageview , matrix translation right now. try translating image code.
imageview view = (imageview) findviewbyid(r.id.imageview); view.setscaletype(imageview.scaletype.matrix); matrix matrix = new matrix(); matrix.posttranslate(0, 0); view.setimagematrix(matrix);
with above code, imageview show top left image @ top left of screen (number 1). , try change translate value matrix.posttranslate(-1280, -960);
expect (number 3) image show outside of screen because image dimension 1280 x 960 px. result image below (number 2).
*black rectangle shown in screen of device.
my question why translating image -1280,-960 moving image center? translating unit not pixel? or making mistake here? device samsung note 3 neo resolution 720 x 1280 pixels.
Comments
Post a Comment