BNBCameraComposer
Objective-C
@interface BNBCameraComposer : NSObject
/**
* Pass empty path to reset background image.
* Supported extensions: jpg, jpeg, png, mp4, gif
* play and loop args only for video
*/
- (void)setBackgroundImage:(nonnull NSString *)path
play:(BOOL)play
loop:(BOOL)loop;
- (void)setBackgroundImageByFd:(int32_t)fd;
- (void)setBackgroundVideoByFd:(int32_t)fd
play:(BOOL)play
loop:(BOOL)loop;
- (nullable BNBImage *)getBackgroundImage;
- (nullable BNBVideo *)getBackgroundVideo;
- (void)enableBlur:(BOOL)enable;
- (void)setBlurRadius:(int32_t)radius;
- (void)setBgTransparencyFactor:(float)factor;
- (void)setRotation:(float)degrees;
- (void)setScale:(float)x
y:(float)y;
- (void)setContentMode:(int32_t)mode;
- (void)setBackgroundColor:(float)r
g:(float)g
b:(float)b
a:(float)a;
/**
* Specifies the color of the area not covered by background texture (e.g. `contentMode` `FIT`).
* Black by default. Transparency (`a`) is a conventional argument only and currently ignored
* (use `1` for it).
*/
- (void)setClearColor:(float)r
g:(float)g
b:(float)b
a:(float)a;
@end
Swift
class BNBCameraComposer : NSObject
Undocumented
-
Pass empty path to reset background image. Supported extensions: jpg, jpeg, png, mp4, gif play and loop args only for video
Declaration
Objective-C
- (void)setBackgroundImage:(nonnull NSString *)path play:(BOOL)play loop:(BOOL)loop;
Swift
func setBackgroundImage(_ path: String, play: Bool, loop: Bool)
-
Undocumented
Declaration
Objective-C
- (void)setBackgroundImageByFd:(int32_t)fd;
Swift
func setBackgroundImageByFd(_ fd: Int32)
-
Undocumented
Declaration
Objective-C
- (void)setBackgroundVideoByFd:(int32_t)fd play:(BOOL)play loop:(BOOL)loop;
Swift
func setBackgroundVideoByFd(_ fd: Int32, play: Bool, loop: Bool)
-
Undocumented
Declaration
Objective-C
- (void)enableBlur:(BOOL)enable;
Swift
func enableBlur(_ enable: Bool)
-
Undocumented
Declaration
Objective-C
- (void)setBlurRadius:(int32_t)radius;
Swift
func setBlurRadius(_ radius: Int32)
-
Undocumented
Declaration
Objective-C
- (void)setBgTransparencyFactor:(float)factor;
Swift
func setBgTransparencyFactor(_ factor: Float)
-
Undocumented
Declaration
Objective-C
- (void)setRotation:(float)degrees;
Swift
func setRotation(_ degrees: Float)
-
Undocumented
Declaration
Objective-C
- (void)setScale:(float)x y:(float)y;
Swift
func setScale(_ x: Float, y: Float)
-
Undocumented
Declaration
Objective-C
- (void)setContentMode:(int32_t)mode;
Swift
func setContentMode(_ mode: Int32)
-
Undocumented
Declaration
Objective-C
- (void)setBackgroundColor:(float)r g:(float)g b:(float)b a:(float)a;
Swift
func setBackgroundColor(_ r: Float, g: Float, b: Float, a: Float)
-
Specifies the color of the area not covered by background texture (e.g.
contentMode
FIT
). Black by default. Transparency (a
) is a conventional argument only and currently ignored (use1
for it).Declaration
Objective-C
- (void)setClearColor:(float)r g:(float)g b:(float)b a:(float)a;
Swift
func setClearColor(_ r: Float, g: Float, b: Float, a: Float)