我用我的Google-fu对这个问题无济于事。我的问题:我有一个Android应用,它使用下面的Camera
类在EllipseView
预览的顶部覆盖椭圆:
public class EllipseView extends View {
private Paint paint = new Paint();
public EllipseView(Context context) {
super(context);
paint.setAntiAlias(true);
paint.setStyle(Paint.Style.STROKE);
paint.setStrokeWidth(5.0f);
paint.setColor(Color.GREEN);
paint.setAlpha(0x60);
}
@Override
public void onDraw(Canvas canvas) {
Point canvasCenter = new Point(canvas.getWidth() / 2, canvas.getHeight() / 2);
RectF oval = new RectF(canvasCenter.x - 100, canvasCenter.y - 75, canvasCenter.x + 100, canvasCenter.y + 75);
canvas.drawOval(oval, paint);
canvas.drawCircle(canvasCenter.x, canvasCenter.y, 5, paint);
}
}
是否可以在捕获的图片中找到相同的oval
坐标?或者,我是否必须手动确定变换?
答案 0 :(得分:0)
做你的魔法......
更详细的帮助here