RRAbstractTryOnLayout

Objective-C

@interface RRAbstractTryOnLayout : RRAbstractLayout

Swift

class RRAbstractTryOnLayout : RRAbstractLayout

Abstract base class for layouts with a garment try-on like RRUserPhotoLayout or RRSceneLayout.

  • Allows the placement of a RRQuadRenderable in the lower right corner of the used renderview. This is intended to be used for adding a watermark when for example sharing the content of the view. The quad is scaled to a fifth of the width of the RRRenderView while the original aspect ratio is maintained.

    See

    RRGLRenderView::renderToImage:

    Declaration

    Objective-C

    @property (nonatomic, strong) RRQuadRenderable *_Nullable watermarkRenderable;

    Swift

    var watermarkRenderable: RRQuadRenderable? { get set }
  • Changes the displayed avatar to the provided one. The fitting is recomputed automatically if the garments were created with autocomputeFit = YES. Otherwise you have to manually invoke recomputation of the fit.

    Declaration

    Objective-C

    @property (nonatomic, strong) RRAvatarRenderable *_Nonnull avatarRenderable;

    Swift

    var avatarRenderable: RRAvatarRenderable { get set }

    Parameters

    avatar

    The new RRAvatarRenderable to be used with this layout.

  • Updates the displayed garments. Fitting is performed automatically if the garments were created with autocomputeFit = YES. Otherwise you have to manually invoke fit computation.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSArray<RRGarmentRenderable *> *_Nullable garmentRenderables;

    Swift

    var garmentRenderables: [RRGarmentRenderable]? { get set }

    Parameters

    garmentRenderables

    An array of RRGarmentRenderable objects that sould be displayed.

  • Enable/disable automatic zooming to the virtual try-on garments

    Declaration

    Objective-C

    @property (nonatomic) BOOL zoomToGarmentsEnabled;

    Swift

    var zoomToGarmentsEnabled: Bool { get set }
  • Enable/disable try on animation

    Declaration

    Objective-C

    @property (nonatomic) BOOL tryOnAnimationEnabled;

    Swift

    var tryOnAnimationEnabled: Bool { get set }