Polygon

smile.pictures.Polygon
object Polygon

Polygons and polylines through any points.

import smile.colors.PresetColor.*
import smile.modeling.*

val points =
 Seq(Pos(0, 20), Pos(60, 20), Pos(60, 0), Pos(100, 30), Pos(60, 60), Pos(60, 40), Pos(0, 40))
val arrow = Polygon(Pos.Origin, points, fillWith(Navy), None)

A navy arrow pointing right

Attributes

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

Members list

Value members

Concrete methods

def apply(pos: Pos, points: Seq[Pos], fill: Option[FillStyle], line: Option[StrokeStyle]): Element

The polygon through points, each relative to pos, closed back to the first point when there are more than two of them, and otherwise the line from one to the other. Its anchor is the middle of its points' box, wherever pos is. No points at all give the empty picture.

The polygon through points, each relative to pos, closed back to the first point when there are more than two of them, and otherwise the line from one to the other. Its anchor is the middle of its points' box, wherever pos is. No points at all give the empty picture.

Attributes

Throws
IllegalArgumentException

if a coordinate is not finite

Source
Shapes.scala