WhiteCameraBound Class Reference

Inherits from WhiteObject
Declared in WhiteCameraBound.h

Overview

The boundaries for the view.

The area enclosed by the boundaries is the viewable area. Within the viewable area, the user can flexibly move or zoom the view. When the user tries to move the view beyond the viewable area, the SDK automatically drags the view back into the viewable area.

– initWithCenter:minContent:maxContent:

Sets the center of the viewable area and initializes the WhiteCameraBound object.

- (instancetype)initWithCenter:(CGPoint)visionCenter minContent:(WhiteContentModeConfig *)minConfig maxContent:(WhiteContentModeConfig *)maxConfig

Parameters

visionCenter

The coordinate of the center in the viewable area in the world coordinate system (taking the center of the initial whiteboard as the origin).

minConfig

The minimum scale factor of the viewable area.

maxConfig

The maximum scale factor of the viewable area.

Return Value

An initialized WhiteCameraBound object.

Declared In

WhiteCameraBound.h

– initWithFrame:minContent:maxContent:

Sets the frame of the viewable area and initializes the WhiteCameraBound object.

- (instancetype)initWithFrame:(CGRect)visionFrame minContent:(WhiteContentModeConfig *)minConfig maxContent:(WhiteContentModeConfig *)maxConfig

Parameters

visionFrame

The frame, that is, the value of (width * height) of the viewable area。

minConfig

The minimum frame (visionFrame * miniScale) of the viewable area.

maxConfig

The maximum frame (visionFrame * maxScale) of the viewable area.

Return Value

An initialized WhiteCameraBound object.

Declared In

WhiteCameraBound.h

+ defaultMinContentModeScale:maxContentModeScale:

Sets the default minimum scale mode of the viewable area.

+ (instancetype)defaultMinContentModeScale:(CGFloat)miniScale maxContentModeScale:(CGFloat)maxScale

Parameters

miniScale

The minimum scale factor of the viewable area.

maxScale

The maximum scale factor of the viewable area.

Declared In

WhiteCameraBound.h

  centerX

The X coordinate of the center of the viewable area in the world coordinate system. The default value is 0.0.

@property (nonatomic, nullable, strong) NSNumber *centerX

Declared In

WhiteCameraBound.h

  centerY

The Y coordinate of the center of the viewable area in the world coordinate system. The default value is 0.0.

@property (nonatomic, nullable, strong) NSNumber *centerY

Declared In

WhiteCameraBound.h

  width

The width (pixels) of the viewable area. If you do not set this parameter, the viewable area has no width limit.

@property (nonatomic, nullable, strong) NSNumber *width

Declared In

WhiteCameraBound.h

  height

The height (pixels) of the viewable area. If you do not set this parameter, the viewable area has no height limit.

@property (nonatomic, nullable, strong) NSNumber *height

Declared In

WhiteCameraBound.h

  maxContentMode

The scale mode and the maximum scale factor of the viewable area. See WhiteContentModeConfig.

@property (nonatomic, nullable, strong) WhiteContentModeConfig *maxContentMode

Declared In

WhiteCameraBound.h

  minContentMode

The scale mode and the minimum scale factor of the viewable area. See WhiteContentModeConfig.

@property (nonatomic, nullable, strong) WhiteContentModeConfig *minContentMode

Declared In

WhiteCameraBound.h