我有一个表面视图,我在上面绘制位图。我怎样才能使surfaceview上的所有内容都像< | >
我的seBitmap方法就像,
if (bmp != null)
{
m_canvas = m_holder.lockCanvas(rect);
if (m_canvas == null)
return;
m_paint = new Paint();
m_canvas.drawBitmap(bmp, null, rect, m_paint);
if (m_holder != null)
m_holder.unlockCanvasAndPost(m_canvas);
}
答案 0 :(得分:0)
您只需将位图缩放-1即可翻转。例如:
m_canvas.scale(-1.0f, 1.0f, rect.width()/2, rect.height()/2);
m_canvas.drawBitmap(bmp, null, rect, m_paint);