Rectangle
smile.pictures.Rectangle
object Rectangle
Rectangles and squares.
import smile.colors.PresetColor.*
val rectangle = Rectangle(120, 60, fillWith(CornflowerBlue), None)

Attributes
- Source
- Shapes.scala
- Graph
-
- Supertypes
- Self type
-
Rectangle.type
Members list
Value members
Concrete methods
A square with sides of sideLength, centered at the origin.
A square with sides of sideLength, centered at the origin.
Attributes
- Throws
-
IllegalArgumentException
if the side length is negative or not a number
- Source
- Shapes.scala
A square with sides of sideLength, centered at center.
A square with sides of sideLength, centered at center.
Attributes
- Throws
-
IllegalArgumentException
if the side length is negative or not a number
- Source
- Shapes.scala
A rectangle baseLength wide and height high, centered at the origin.
A rectangle baseLength wide and height high, centered at the origin.
Attributes
- Throws
-
IllegalArgumentException
if a length is negative or not a number
- Source
- Shapes.scala
A rectangle baseLength wide and height high, centered at center.
A rectangle baseLength wide and height high, centered at center.
Attributes
- Throws
-
IllegalArgumentException
if a length is negative or not a number
- Source
- Shapes.scala
In this article
