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
pointPart of the face, relative to which the mask should be placed
xShiftShift 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)
yShiftShift 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)
scaleMask scaling coefficient. (For example, 2.0 means a doubled size)
View on GitHub
Install in Dash
MaskPosition Structure Reference