RRQuadRenderable

Objective-C

@interface RRQuadRenderable : RRRenderable

Swift

class RRQuadRenderable : RRRenderable

A renderable for displaying a textured quad. For example to show a watermark of a renderview. Therefore a RRQuadRenderable can be set as watermarkRenderable of a RRUserPhotoLayout.

  • Undocumented

    Declaration

    Objective-C

    +(RRRenderableType* _Nonnull) getRenderableType;

    Swift

    class func getType() -> RRRenderableType
  • Default-initializes a RRQuadRenderable. This means the quad has size of -0.5/0.5 in X and Y and no texture assigned.

    Declaration

    Objective-C

    - (instancetype _Nonnull)init;

    Swift

    init()

    Return Value

    An instance of RRQuadRenderable on success, nil otherwise.

  • Creates a RRQuadRenderable from an RRImage. The size of the returned renderable is set to the size of the image. The image is used as texture for the quad.

    Declaration

    Objective-C

    + (RRQuadRenderable *_Nonnull)quadRenderableWithImage:(RRImage *_Nonnull)image;

    Swift

    /*not inherited*/ init(image: RRImage)

    Parameters

    image

    An arbitrary RRImage which is used as texture and as size reference.

    Return Value

    An instance of RRQuadRenderable on success, nil otherwise.

  • Creates a RRQuadRenderabel from an RRImage where the height equals 1 and the width equals the aspect ratio of the image.

    Declaration

    Objective-C

    + (RRQuadRenderable *_Nonnull)normalizedQuadRenderableWithImage:
        (RRImage *_Nonnull)image;

    Swift

    class func normalizedQuadRenderable(with image: RRImage) -> RRQuadRenderable

    Parameters

    image

    An arbitrary RRImage which is used as texture.

    Return Value

    An instance of RRQuadRenderable on success, nil otherwise.

  • Updates the texture of the quad with the given image. The geometry is not changed.

    Declaration

    Objective-C

    - (void)setTexture:(RRImage *_Nonnull)texture;

    Swift

    func setTexture(_ texture: RRImage)

    Parameters

    texture

    Instance of an RRImage which is to be used as the new texture.