Rectangle
Factory object for creating rectangles.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Rectangle.type
Members list
Value members
Concrete methods
Creates a square with a given side length, fill style, and stroke style.
Creates a square with a given side length, fill style, and stroke style.
Value parameters
- fillStyle
-
Optional fill style for the square.
- sideLength
-
The length of each side of the square.
- strokeStyle
-
Optional stroke style for the square.
Attributes
- Returns
-
A
VectorGraphic
representing the square.
Creates a square with a given side length, center position, fill style, and stroke style.
Creates a square with a given side length, center position, fill style, and stroke style.
Value parameters
- center
-
The center position of the square.
- fillStyle
-
Optional fill style for the square.
- sideLength
-
The length of each side of the square.
- strokeStyle
-
Optional stroke style for the square.
Attributes
- Returns
-
A
VectorGraphic
representing the square. - Throws
-
IllegalArgumentException
If the side length is negative.
Creates a rectangle with a given base length, height, fill style, and stroke style.
Creates a rectangle with a given base length, height, fill style, and stroke style.
Value parameters
- baseLength
-
The length of the base of the rectangle.
- fillStyle
-
Optional fill style for the rectangle.
- height
-
The height of the rectangle.
- strokeStyle
-
Optional stroke style for the rectangle.
Attributes
- Returns
-
A
VectorGraphic
representing the rectangle.
Creates a rectangle with a given base length, height, center position, fill style, and stroke style.
Creates a rectangle with a given base length, height, center position, fill style, and stroke style.
Value parameters
- baseLength
-
The length of the base of the rectangle.
- center
-
The center position of the rectangle.
- fillStyle
-
Optional fill style for the rectangle.
- height
-
The height of the rectangle.
- strokeStyle
-
Optional stroke style for the rectangle.
Attributes
- Returns
-
A
VectorGraphic
representing the rectangle. - Throws
-
IllegalArgumentException
If the base length or height is negative.