Here's some code that sets a matrix that zooms to the upper left corner:

 
RectF movie = new RectF(0, 0, 1, 1);
                    
// zoom to upper left corner
RectF zoom_region = new RectF(0, 0, .5f, .5f);

Matrix transform = new Matrix();
transform.setRectToRect( zoom_region, movie, ScaleToFit.FILL);

mTextureView.setTransform(transform);




On Friday, January 18, 2013 2:50:57 PM UTC-6, bob wrote:
>
> Also, you will want to use this function in the Matrix class to get
> the matrix that will do the cropping:
>
> boolean
> setRectToRect(RectF src, RectF dst, Matrix.ScaleToFit stf)
> Set the matrix to the scale and translate values that map the source 
> rectangle to the destination rectangle, returning true if the the result 
> can be represented.
>
>
>
> On Friday, January 18, 2013 2:01:29 PM UTC-6, yashika wrote:
>>
>> Thanku so much .. lbendlin.  
>
>

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

Reply via email to