MaskPosition

public struct MaskPosition : Codable, Equatable, FunctionResult

Position on a photo where a mask should be placed

  • Part of the face, relative to which the mask should be placed

    Declaration

    Swift

    public let point: MaskPoint
  • Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)

    Declaration

    Swift

    public let xShift: Double
  • Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. (For example, 1.0 will place the mask just below the default mask position)

    Declaration

    Swift

    public let yShift: Double
  • Mask scaling coefficient. (For example, 2.0 means a doubled size)

    Declaration

    Swift

    public let scale: Double
  • Position on a photo where a mask should be placed

    Declaration

    Swift

    public init(point: MaskPoint, xShift: Double, yShift: Double, scale: Double)

    Parameters

    point

    Part of the face, relative to which the mask should be placed

    xShift

    Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)

    yShift

    Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. (For example, 1.0 will place the mask just below the default mask position)

    scale

    Mask scaling coefficient. (For example, 2.0 means a doubled size)