adam

On Sep 27, 6:02 pm, Adam Lichwierowicz <[email protected]>
wrote:
> "i think it should just work provided you get the matrix after the
> layout management has been done on your imageview"
>
> Than please advice when exactly (or where in the code to be precise)
> is this moment - since in all of the listeners I have mentioned, the
> Matrix did not gave correct points - the points where the same as if
> the imageview was not rescaled at all. So I.e. Input point 110,50
> (correct on original unscaled bitmap)- output points 110,50 (incorrect
> on the screen)
>

with the following in my Activity:

        @Override
        protected void onResume() {
                super.onResume();
                Log.d(TAG, "onResume ");
                ImageView iv = (ImageView) findViewById(R.id.iv);
                Matrix m = iv.getImageMatrix();
                Log.d(TAG, "onResume " + m);
        }

        @Override
        public void onWindowFocusChanged(boolean hasFocus) {
                super.onWindowFocusChanged(hasFocus);
                Log.d(TAG, "onWindowFocusChanged " + hasFocus);
                if (hasFocus) {
                        ImageView iv = (ImageView) findViewById(R.id.iv);
                        Matrix m = iv.getImageMatrix();
                        Log.d(TAG, "onWindowFocusChanged " + m);
                }
        }

i got in the logcat:

D/ShapeActivity(  829): onResume
D/ShapeActivity(  829): onResume Matrix{[1.0, 0.0, 0.0][0.0, 1.0, 0.0]
[0.0, 0.0, 1.0]}
D/ShapeActivity(  829): onWindowFocusChanged true
D/ShapeActivity(  829): onWindowFocusChanged Matrix{[5.6666665, 0.0,
24.0][0.0, 5.6666665, 0.0][0.0, 0.0, 1.0]}

where:

in onResume: Matrix{[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}
means the identity Matrix (default one)

and

in onWindowFocusChanged: Matrix{[5.6666665, 0.0, 24.0][0.0, 5.6666665,
0.0][0.0, 0.0, 1.0]} means transformed Matrix due to layout management
for ImageView

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to