CameraArea class

Used for choosing specific metering and focus areas for the camera to use when calculating auto-exposure, auto-white balance, and auto-focus.

To find out how many simultaneous areas a given camera supports, use CameraParameters.getMaxNumMeteringAreas and CameraParameters.getMaxNumFocusAreas. If metering or focusing area selection is unsupported, these methods will return 0.

Each Area consists of a rectangle specifying its bounds, and a weight that determines its importance. The bounds are relative to the camera's current field of view. The coordinates are mapped so that (-1000, -1000) is always the top-left corner of the current field of view, and (1000, 1000) is always the bottom-right corner of the current field of view. Setting Areas with bounds outside that range is not allowed. Areas with zero or negative width or height are not allowed.

The weight must range from 1 to 1000, and represents a weight for every pixel in the area. This means that a large metering area with the same weight as a smaller area will have more effect in the metering result. Metering areas can overlap and the driver will add the weights in the overlap region.

Annotations
  • @Reference('android_hardware/camera/CameraArea')

Constructors

CameraArea(CameraRect rect, int weight)
Default constructor for CameraArea.
CameraArea.withoutCreate(CameraRect rect, int weight)
Construct a CameraArea without creating the paired Java object.

Properties

hashCode int
The hash code for this object.
no setterinherited
rect CameraRect
Bounds of the area.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
weight int
Weight of the area.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited