Class OverlaySettings.Builder

    • Method Detail

      • setUsesHdr

        @CanIgnoreReturnValue
        public OverlaySettings.Builder setUsesHdr​(boolean useHdr)
        Sets whether input overlay comes from an HDR source. If true, colors will be in linear RGB BT.2020. If false, colors will be in linear RGB BT.709.

        Set to false by default.

      • setMatrix

        @CanIgnoreReturnValue
        public OverlaySettings.Builder setMatrix​(float[] matrix)
        Sets the Matrix used to transform the overlay before applying it to a frame.

        Set to always return the identity matrix by default.

      • setAlpha

        @CanIgnoreReturnValue
        public OverlaySettings.Builder setAlpha​(@FloatRange(from=0.0,to=1.0)
                                                float alpha)
        Sets the alpha value of the overlay, altering its transparency.

        Alpha values range from 0 (all transparent) to 1 (completely opaque).

        Set to always return 1 by default.

      • setAnchor

        @CanIgnoreReturnValue
        public OverlaySettings.Builder setAnchor​(@FloatRange(from=-1.0,to=1.0)
                                                 float x,
                                                 @FloatRange(from=-1.0,to=1.0)
                                                 float y)
        Sets the coordinates for the anchor point of the overlay.

        The anchor point is the point inside the overlay that the overlay is positioned from.

        The coordinates are specified in Normalised Device Coordinates (NDCs). Set to always return (0,0) (the center) by default.

        Parameters:
        x - The NDC x-coordinate in the range [-1, 1].
        y - The NDC y-coordinate in the range [-1, 1].