summaryrefslogtreecommitdiff
path: root/src/main/scala/graphyx/graphics/GraphicalRegularPolygon.scala
blob: fff8a9e227599458b9516b1760d7d1c8ef112d7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Graphyx
 * copyright (c) 2009 Jakob Odersky
 * made available under the MIT License
*/

package graphyx.graphics

import sims._
import geometry._
import dynamics._
class GraphicalRegularPolygon(val real: RegularPolygon) extends RegularPolygon(real.n, real.radius, real.density) with GraphicalShape{
  override def draw() = {
    g.setColor(java.awt.Color.orange)
    fillPolygon(vertices)
    g.setColor(java.awt.Color.BLACK)
    drawPolygon(vertices)
  }
}