Example usage for android.hardware.camera2.params MeteringRectangle getX

List of usage examples for android.hardware.camera2.params MeteringRectangle getX

Introduction

In this page you can find the example usage for android.hardware.camera2.params MeteringRectangle getX.

Prototype

public int getX() 

Source Link

Document

Return the X coordinate of the left side of the rectangle.

Usage

From source file:com.android.camera2.its.ItsSerializer.java

@SuppressWarnings("unchecked")
private static Object serializeMeteringRectangle(MeteringRectangle rect) throws org.json.JSONException {
    JSONObject rectObj = new JSONObject();
    rectObj.put("x", rect.getX());
    rectObj.put("y", rect.getY());
    rectObj.put("width", rect.getWidth());
    rectObj.put("height", rect.getHeight());
    rectObj.put("weight", rect.getMeteringWeight());
    return rectObj;
}