RoundedRectangle

RoundedRectangle

{Object} RoundingRectangle RoundingRectangle object

Constructor

new RoundedRectangle()

Source:
Properties:
Name Type Attributes Default Description
point Point X & Y axis coordinates
aspect Aspect Aspect properties
round Array <optional>
[5, 5, 5, 5] Rounding properties
stroke Stroke Stroke properties
fill Fill Fill properties
shadow Shadow Shadow properties
anchor Anchor Anchor properties
canvas HTMLCanvasElement 2D canvas context
options Options Options for this object
position Position Position properties

Extends

Methods

anchor() → {Anchor}

Description:
  • Get anchor
Source:
Inherited From:
Returns:
Anchor properties
Type
Anchor

area() → {number}

Description:
  • Get area of this object
Source:
Inherited From:
See:
Returns:
Area of this object
Type
number

aspect(value)

Description:
  • Set aspect properties
Source:
Overrides:
Parameters:
Name Type Description
value Aspect Aspect properties

canvas(value)

Description:
  • Set canvas value
Source:
Overrides:
See:
Parameters:
Name Type Description
value string Canvas id

center() → {Point}

Description:
  • Get center of this object
Source:
Inherited From:
See:
Returns:
Center point coordinates
Type
Point

draw(canvas)

Description:
  • Draw this object
Source:
Inherited From:
Parameters:
Name Type Description
canvas string Canvas Id

fill() → {Fill}

Description:
  • Get fill properties
Source:
Inherited From:
Returns:
Fill properties
Type
Fill

fillColorCycle(progress, start, end, maxopt)

Description:
  • Cycle colors for fill
Source:
Inherited From:
See:
Parameters:
Name Type Attributes Default Description
progress number Progress time unit between; 0.00 - 1.00
start Rgb Starting RGB value
end Rgb Ending RGB value
max number <optional>
1 Maximum increments

gradientColorCycle(progress, start, end, stop, maxopt)

Description:
  • Cycle colors for gradient
Source:
Inherited From:
See:
Parameters:
Name Type Attributes Default Description
progress number Progress time unit between; 0.00 - 1.00
start Rgb Starting RGB value
end Rgb Ending RGB value
stop number Gradient color stop
max number <optional>
1 Maximum increments

height(value)

Description:
  • Set aspect height
Source:
Overrides:
Parameters:
Name Type Description
value number Height value

isThere(rectangle)

Description:
  • Check whether the passed object is already present
Source:
Inherited From:
Parameters:
Name Type Description
rectangle Rectangle Object to validate

move(degree, distance, drawopt, clearopt)

Description:
  • Move this object
Source:
Inherited From:
See:
Parameters:
Name Type Attributes Default Description
degree number Direction to move; in degrees
distance number Distance to move
draw boolean <optional>
false Draw post movement
clear boolean <optional>
false Clear canvas during each movement

options() → {Options}

Description:
  • Get options properties
Source:
Inherited From:
Returns:
Options properties
Type
Options

perimeter() → {number}

Description:
  • Get perimeter
Source:
Inherited From:
See:
Returns:
Perimeter of rectangle
Type
number

point(value)

Description:
  • Set point
Source:
Overrides:
See:
Parameters:
Name Type Description
value Point X & Y coordinates

rotate(degree, anchoropt, clearopt)

Description:
  • Rotate this object
Source:
Inherited From:
See:
Parameters:
Name Type Attributes Default Description
degree number Distance to rotate; in degrees
anchor string <optional>
'center' Anchoring point during rotation
clear number <optional>
true Clear canvas during each rotation

round(value)

Description:
  • Set round properties
Source:
Overrides:
Parameters:
Name Type Description
value Array Radii properties

shadow() → {Shadow}

Description:
  • Get shadow properties
Source:
Inherited From:
Returns:
Shadow properties
Type
Shadow

showCoordinates(offsetopt, fontSizeopt)

Description:
  • Shows coordinates of this object
Source:
Inherited From:
See:
Parameters:
Name Type Attributes Default Description
offset number <optional>
10 Offset of coordinates y origin
fontSize number <optional>
16 Coordinates font size

stroke() → {Stroke}

Description:
  • Get stroke properties
Source:
Inherited From:
Returns:
Stroke properties
Type
Stroke

width(value)

Description:
  • Set aspect width
Source:
Overrides:
Parameters:
Name Type Description
value number Width value

x(value)

Description:
  • Set x-axis value
Source:
Overrides:
See:
Parameters:
Name Type Description
value number X coordinate value

y(value)

Description:
  • Set y-axis value
Source:
Overrides:
See:
Parameters:
Name Type Description
value number Y coordinate value