Rectangle

smile.pictures.Rectangle
object Rectangle

Rectangles and squares.

import smile.colors.PresetColor.*

val rectangle = Rectangle(120, 60, fillWith(CornflowerBlue), None)

A blue rectangle

Attributes

Source
Shapes.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Rectangle.type

Members list

Value members

Concrete methods

def apply(sideLength: Double, fill: Option[FillStyle], line: Option[StrokeStyle]): Shape

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
def apply(sideLength: Double, center: Pos, fill: Option[FillStyle], line: Option[StrokeStyle]): Shape

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
def apply(baseLength: Double, height: Double, fill: Option[FillStyle], line: Option[StrokeStyle]): Shape

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
def apply(baseLength: Double, height: Double, center: Pos, fill: Option[FillStyle], line: Option[StrokeStyle]): Shape

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