MeteringPointFactory
public
abstract
class
MeteringPointFactory
extends Object
java.lang.Object | |
↳ | androidx.camera.core.MeteringPointFactory |
A factory to create a MeteringPoint
.
Users can call createPoint(float, float)
to
create a MeteringPoint
with x, y, default size. There is also another
variant, createPoint(float, float, float)
for apps that want to also specify size.
Summary
Public methods | |
---|---|
final
MeteringPoint
|
createPoint(float x, float y)
Creates a |
final
MeteringPoint
|
createPoint(float x, float y, float size)
Creates a |
static
float
|
getDefaultPointSize()
Returns default point size. |
Inherited methods | |
---|---|
Public methods
createPoint
public final MeteringPoint createPoint (float x, float y)
Creates a MeteringPoint
by x, y.
The (x, y) is a position from the area defined by the specific
MeteringPointFactory
implementation, such as
DisplayOrientedMeteringPointFactory
or SurfaceOrientedMeteringPointFactory
.
Parameters | |
---|---|
x |
float : x to be converted. |
y |
float : y to be converted. |
Returns | |
---|---|
MeteringPoint |
A MeteringPoint that is converted into normalized surface (x, y). |
createPoint
public final MeteringPoint createPoint (float x, float y, float size)
Creates a MeteringPoint
by x, y, size.
The (x, y) is a position from the area defined by the specific
MeteringPointFactory
implementation, such as
DisplayOrientedMeteringPointFactory
or SurfaceOrientedMeteringPointFactory
.
Parameters | |
---|---|
x |
float : x to be converted. |
y |
float : y to be converted. |
size |
float : size of the MeteringPoint width and height(ranging from 0 to 1). It is the
(normalized) percentage of the sensor width/height (or crop region
width/height if crop region is set). |
Returns | |
---|---|
MeteringPoint |
A MeteringPoint that is converted into normalized surface (x, y). |
getDefaultPointSize
public static float getDefaultPointSize ()
Returns default point size. It is the default size of the MeteringPoint width and height (ranging from 0 to 1) which is a (normalized) percentage of the sensor width/height (or crop region width/height if crop region is set).
Returns | |
---|---|
float |
See also: