80,360
社区成员
发帖
与我相关
我的任务
分享
/**
* <p>Sets the transform to associate with this texture view.
* The specified transform applies to the underlying surface
* texture and does not affect the size or position of the view
* itself, only of its content.</p>
*
* <p>Some transforms might prevent the content from drawing
* all the pixels contained within this view's bounds. In such
* situations, make sure this texture view is not marked opaque.</p>
*
* @param transform The transform to apply to the content of
* this view.
*
* @see #getTransform(android.graphics.Matrix)
* @see #isOpaque()
* @see #setOpaque(boolean)
*/
public void setTransform(Matrix transform) {
mMatrix.set(transform);
mMatrixChanged = true;
invalidateParentIfNeeded();
}
[/quote]
有办法在摄像头把预览图渲染到surfaceView上之前把数据改掉么。。。
/**
* <p>Sets the transform to associate with this texture view.
* The specified transform applies to the underlying surface
* texture and does not affect the size or position of the view
* itself, only of its content.</p>
*
* <p>Some transforms might prevent the content from drawing
* all the pixels contained within this view's bounds. In such
* situations, make sure this texture view is not marked opaque.</p>
*
* @param transform The transform to apply to the content of
* this view.
*
* @see #getTransform(android.graphics.Matrix)
* @see #isOpaque()
* @see #setOpaque(boolean)
*/
public void setTransform(Matrix transform) {
mMatrix.set(transform);
mMatrixChanged = true;
invalidateParentIfNeeded();
}
[/quote]
能麻烦讲得详细点么,怎么样才能达到裁剪的效果,我只知道矩阵可以处理纹理的各种效果,可不知道怎么裁剪掉surfaceView的一部分不进行绘制啊
/**
* <p>Sets the transform to associate with this texture view.
* The specified transform applies to the underlying surface
* texture and does not affect the size or position of the view
* itself, only of its content.</p>
*
* <p>Some transforms might prevent the content from drawing
* all the pixels contained within this view's bounds. In such
* situations, make sure this texture view is not marked opaque.</p>
*
* @param transform The transform to apply to the content of
* this view.
*
* @see #getTransform(android.graphics.Matrix)
* @see #isOpaque()
* @see #setOpaque(boolean)
*/
public void setTransform(Matrix transform) {
mMatrix.set(transform);
mMatrixChanged = true;
invalidateParentIfNeeded();
}