Agora Interactive Whiteboard Java API Reference
Public Member Functions | List of all members
com.herewhite.sdk.domain.CameraBound Class Reference
Inheritance diagram for com.herewhite.sdk.domain.CameraBound:
com.herewhite.sdk.domain.WhiteObject

Public Member Functions

Double getCenterX ()
 
void setCenterX (Double centerX)
 
Double getCenterY ()
 
void setCenterY (Double centerY)
 
Double getWidth ()
 
void setWidth (Double width)
 
Double getHeight ()
 
void setHeight (Double height)
 
ContentModeConfig getMaxContentMode ()
 
void setMaxContentMode (ContentModeConfig maxContentMode)
 
ContentModeConfig getMinContentMode ()
 
void setMinContentMode (ContentModeConfig minContentMode)
 
Double getDamping ()
 
void setDamping (Double damping)
 
 CameraBound (Double miniScale, Double maxScale)
 
- Public Member Functions inherited from com.herewhite.sdk.domain.WhiteObject
String toString ()
 
JSONObject toJSON ()
 

Detailed Description

The CameraBound class, for setting 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.

Since
2.5.0

Constructor & Destructor Documentation

◆ CameraBound()

com.herewhite.sdk.domain.CameraBound.CameraBound ( Double  miniScale,
Double  maxScale 
)

Initializes the viewable area.

Parameters
miniScaleThe minimum scale factor of the viewable area.
maxScaleThe maximum scale factor of the viewable area.

Member Function Documentation

◆ getCenterX()

Double com.herewhite.sdk.domain.CameraBound.getCenterX ( )

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

Returns
The X coordinate of the center of the viewable area in the world coordinate system.

◆ setCenterX()

void com.herewhite.sdk.domain.CameraBound.setCenterX ( Double  centerX)

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

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

◆ getCenterY()

Double com.herewhite.sdk.domain.CameraBound.getCenterY ( )

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

Returns
The Y coordinate of the center of the viewable area in the world coordinate system.

◆ setCenterY()

void com.herewhite.sdk.domain.CameraBound.setCenterY ( Double  centerY)

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

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

◆ getWidth()

Double com.herewhite.sdk.domain.CameraBound.getWidth ( )

Gets the width of the viewable area.

Returns
The width (pixels) of the viewable area.

◆ setWidth()

void com.herewhite.sdk.domain.CameraBound.setWidth ( Double  width)

Sets the width of the viewable area.

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

◆ getHeight()

Double com.herewhite.sdk.domain.CameraBound.getHeight ( )

Gets the height of the viewable area.

Returns
The height (pixels) of the viewable area.

◆ setHeight()

void com.herewhite.sdk.domain.CameraBound.setHeight ( Double  height)

Sets the height of the viewable area.

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

◆ getMaxContentMode()

ContentModeConfig com.herewhite.sdk.domain.CameraBound.getMaxContentMode ( )

Gets the scale mode and the maximum scale factor of the viewable area.

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

◆ setMaxContentMode()

void com.herewhite.sdk.domain.CameraBound.setMaxContentMode ( ContentModeConfig  maxContentMode)

Sets the scale mode and the maximum scale factor of the viewable area.

Parameters
maxContentModeThe scale mode and the maximum scale factor of the viewable area. See ContentModeConfig.

◆ getMinContentMode()

ContentModeConfig com.herewhite.sdk.domain.CameraBound.getMinContentMode ( )

Gets the scale mode and the minimum scale factor of the viewable area.

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

◆ setMinContentMode()

void com.herewhite.sdk.domain.CameraBound.setMinContentMode ( ContentModeConfig  minContentMode)

Sets the scale mode and the minimum scale factor of the viewable area.

Parameters
minContentModeThe scale mode and the minimum scale factor of the viewable area. See ContentModeConfig.

◆ getDamping()

Double com.herewhite.sdk.domain.CameraBound.getDamping ( )

Gets the resistance felt by the user when the user moves or scales up the view beyond the viewable area.

Returns
The resistance coefficient. The return value range is [0.0,1.0]. The higher the value, the larger the resistance felt by the user.

◆ setDamping()

void com.herewhite.sdk.domain.CameraBound.setDamping ( Double  damping)

Sets the resistance felt by the user when the user moves or scales up the view beyond the viewable area.

Parameters
dampingThe resistance coefficient. The value range is [0.0,1.0]. The higher the value, the larger the resistance felt by the user.
  • 0.0: The user feels no resistance when moving or scaling up the view beyond the viewable area. Once the user stops moving or scaling up, the view returns to its original position.
  • 1.0: The user cannot move or scale up the view beyond the viewable area.