Class FrameLayoutHelper


  • public final class FrameLayoutHelper
    extends java.lang.Object
    Responsible for calculating the size and position of the drawing frame on the surface.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static android.graphics.Rect calculateFrameLayout​(android.util.Size surfaceSize, android.util.Size frameSize, ContentMode contentMode)
      Calculates the coordinates of a rectangular drawing area according to the selected logic.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • calculateFrameLayout

        public static android.graphics.Rect calculateFrameLayout​(android.util.Size surfaceSize,
                                                                 android.util.Size frameSize,
                                                                 ContentMode contentMode)
        Calculates the coordinates of a rectangular drawing area according to the selected logic.
        Parameters:
        surfaceSize - drawing surface size
        frameSize - size of the drawing frame
        contentMode - the logic of frame position calculation
        Returns:
        the coordinates of a rectangular drawing area
        See Also:
        ContentMode