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

Public Member Functions

 RectangleConfig (Double width, Double height, AnimationMode mode)
 
 RectangleConfig (Double width, Double height)
 
 RectangleConfig (Double originX, Double originY, Double width, Double height)
 
 RectangleConfig (Double originX, Double originY, Double width, Double height, AnimationMode mode)
 
Double getOriginX ()
 
void setOriginX (Double originX)
 
Double getOriginY ()
 
void setOriginY (Double originY)
 
Double getWidth ()
 
void setWidth (Double width)
 
Double getHeight ()
 
void setHeight (Double height)
 
AnimationMode getAnimationMode ()
 
void setAnimationMode (AnimationMode animationMode)
 
- Public Member Functions inherited from com.herewhite.sdk.domain.WhiteObject
String toString ()
 
JSONObject toJSON ()
 

Detailed Description

Configurations for the view rectangle.

Since
2.2.0

The view rectangle defines a rectangular area that the view must cover. After you set a view rectangle, the SDK automatically adjusts the view to fully contain the rectangular area, so as to ensure contents within the rectangle area are completely displayed.

You can set a view rectangle according to the size of a PPT slide or image to be displayed, to ensure the same content is displayed completely on screens of different sizes.

Constructor & Destructor Documentation

◆ RectangleConfig() [1/4]

com.herewhite.sdk.domain.RectangleConfig.RectangleConfig ( Double  width,
Double  height,
AnimationMode  mode 
)

The RectangleConfig constructor.

In this method, pass in the width, height, and mode parameters. Based on the width and height you pass in, the SDK calculates originX and originY, the X and Y coordinates of the top left corner of the view rectangle in the world coordinate system, in the following ways:

  • originX = - width / 2.0d
  • originY = - height / 2.0d

You can use this method to quickly display a PPT slide completely.

Parameters
widthThe width of the view rectangle. Do not set this parameter to a value smaller than the width of the area you want to display; otherwise, the user may not see the area completely.
heightThe height of the view rectangle. Do not set this parameter to a value smaller than the height of the area you want to display; otherwise, the user may not see the area completely.
modeThe animation mode of the view rectangle. See AnimationMode.

◆ RectangleConfig() [2/4]

com.herewhite.sdk.domain.RectangleConfig.RectangleConfig ( Double  width,
Double  height 
)

The RectangleConfig constructor.

In this method, pass in the width, height, and mode parameters. Based on the width and height you pass in, the SDK calculates originX and originY, the X and Y coordinates of the top left corner of the view rectangle in the world coordinate system, in the following ways:

  • originX = - width / 2.0d
  • originY = - height / 2.0d

This method does not support setting the animation mode of the view rectangle. By default, the SDK sets the animation mode to Continuous.

You can use this method to quickly display a PPT slide completely.

Parameters
widthThe width of the view rectangle. Do not set this parameter to a value smaller than the width of the area you want to display; otherwise, the user may not see the area completely.
heightThe height of the view rectangle. Do not set this parameter to a value smaller than the height of the area you want to display; otherwise, the user may not see the area completely.

◆ RectangleConfig() [3/4]

com.herewhite.sdk.domain.RectangleConfig.RectangleConfig ( Double  originX,
Double  originY,
Double  width,
Double  height 
)

The RectangleConfig constructor.

In this method, pass in the originX, originY, width, and height parameters. Based on these parameters, the SDK determines the position and size of the view rectangle in the world coordinate system.

This method does not support setting the animation mode of the view rectangle. By default, the SDK sets the animation mode to Continuous.

Parameters
originXThe X coordinate of the top left corner of the view rectangle in the world coordinate system (taking the center of the initial whiteboard as the origin).
originYThe Y coordinate of the top left corner of the view rectangle in the world coordinate system (taking the center of the initial whiteboard as the origin).
widthThe width of the view rectangle. Do not set this parameter to a value smaller than the width of the area you want to display; otherwise, the user may not see the area completely.
heightThe height of the view rectangle. Do not set this parameter to a value smaller than the height of the area you want to display; otherwise, the user may not see the area completely.

◆ RectangleConfig() [4/4]

com.herewhite.sdk.domain.RectangleConfig.RectangleConfig ( Double  originX,
Double  originY,
Double  width,
Double  height,
AnimationMode  mode 
)

The RectangleConfig constructor.

In this method, pass in the originX, originY, width, height, and mode parameters. Based on these parameters, the SDK determines the position and size of the view rectangle in the world coordinate system.

Parameters
originXThe X coordinate of the top left corner of the view rectangle in the world coordinate system (taking the center of the initial whiteboard as the origin).
originYThe Y coordinate of the top left corner of the view rectangle in the world coordinate system (taking the center of the initial whiteboard as the origin).
widthThe width of the view rectangle. Do not set this parameter to a value smaller than the width of the area you want to display; otherwise, the user may not see the area completely.
heightThe height of the view rectangle. Do not set this parameter to a value smaller than the height of the area you want to display; otherwise, the user may not see the area completely.
modeThe animation mode of the view rectangle. See AnimationMode.

Member Function Documentation

◆ getOriginX()

Double com.herewhite.sdk.domain.RectangleConfig.getOriginX ( )

Gets the X coordinate of the top left corner of the view rectangle in the world coordinate system (taking the center of the initial whiteboard as the origin).

Returns
The X coordinate of the top left corner of the view rectangle in the world coordinate system.

◆ setOriginX()

void com.herewhite.sdk.domain.RectangleConfig.setOriginX ( Double  originX)

Sets the X coordinate of the top left corner of the view rectangle in the world coordinate system (taking the center of the initial whiteboard as the origin).

Parameters
originXThe X coordinate of the top left corner of the view rectangle in the world coordinate system.

◆ getOriginY()

Double com.herewhite.sdk.domain.RectangleConfig.getOriginY ( )

Gets the Y coordinate of the top left corner of the view rectangle in the world coordinate system (taking the center of the initial whiteboard as the origin).

Returns
The Y coordinate of the top left corner of the view rectangle in the world coordinate system.

◆ setOriginY()

void com.herewhite.sdk.domain.RectangleConfig.setOriginY ( Double  originY)

Sets the Y coordinate of the top left corner of the view rectangle in the world coordinate system (taking the center of the initial whiteboard as the origin).

Parameters
originYThe Y coordinate of the top left corner of the view rectangle in the world coordinate system.

◆ getWidth()

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

Gets the width of the view rectangle.

Returns
The width of the view rectangle.

◆ setWidth()

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

Sets the width of the view rectangle.

Parameters
widthThe width of the view rectangle.

◆ getHeight()

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

Gets the height of the view rectangle.

Returns
The height of the view rectangle.

◆ setHeight()

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

Sets the height of the view rectangle.

Parameters
heightThe height of the view rectangle.

◆ getAnimationMode()

AnimationMode com.herewhite.sdk.domain.RectangleConfig.getAnimationMode ( )

Gets the animation mode of the view rectangle

Returns
The animation mode of the view rectangle. See AnimationMode.

◆ setAnimationMode()

void com.herewhite.sdk.domain.RectangleConfig.setAnimationMode ( AnimationMode  animationMode)

Sets the animation mode of the view rectangle.

Parameters
animationModeThe animation mode of the view rectangle. See AnimationMode.