Inherits from NSObject
Declared in FMSticker.h

Overview

FMSticker is the class that defines images and settings used by FMStickerCaptureView to generate both the preview and final image.

setEyesFeatureWithImage:leftEyePosition:rightEyePosition: and setMouthFeatureWithImage:mouthPosition: are used to define images used by each feature.

Tasks

Other Methods

Setting feature images

Properties

eyesFeature

The eyesFeature object currently used (readonly).

@property (nonatomic, strong, readonly) FMStickerFeatureLayer *eyesFeature

Declared In

FMSticker.h

mouthFeature

The mouthFeature object currently used (readonly).

@property (nonatomic, strong, readonly) FMStickerFeatureLayer *mouthFeature

Declared In

FMSticker.h

Instance Methods

setEyesFeatureWithImage:leftEyePosition:rightEyePosition:

Sets the image to be used with eyes.

- (void)setEyesFeatureWithImage:(UIImage *)image leftEyePosition:(CGPoint)leftEyePosition rightEyePosition:(CGPoint)rightEyePosition

Parameters

image

A UIImage that will be overlayed on the eyes.

leftEyePosition

A CGPoint which defines the point on the image that should be aligned with the left eye position returned by the face detection API.

rightEyePosition

A CGPoint which defines the point on the image that should be aligned with the right eye position returned by the face detection API.

Discussion

Defines the image to be used for the eyes feature. The two parameters leftEyePosition and rightEyePosition define the points (in pixels) on the image where the eyes will get aligned. The origin of the coordinate system is the top left corner of the image. It’s not necessary to include any trasparent area if the points fall outside the boundaries of the image.

Declared In

FMSticker.h

setMouthFeatureWithImage:mouthPosition:

Sets the image to be used with the mouth.

- (void)setMouthFeatureWithImage:(UIImage *)image mouthPosition:(CGPoint)mouthPosition

Parameters

image

A UIImage that will be overlayed on the mouth.

mouthPosition

A CGPoint which defines the point on the image that should be aligned with the mouth position returned by the face detection API.

Discussion

Defines the image to be used for the mouth feature. The mouthPosition parameter defines the point (in pixels) on the image where the mouth will get aligned. The origin of the coordinate system is the top left corner of the image. It’s not necessary to include any trasparent area if the points fall outside the boundaries of the image.

Declared In

FMSticker.h