diff options
Diffstat (limited to 'src/main/scala/graphyx/graphics/GraphicalRegularPolygon.scala')
-rw-r--r-- | src/main/scala/graphyx/graphics/GraphicalRegularPolygon.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/scala/graphyx/graphics/GraphicalRegularPolygon.scala b/src/main/scala/graphyx/graphics/GraphicalRegularPolygon.scala new file mode 100644 index 0000000..fff8a9e --- /dev/null +++ b/src/main/scala/graphyx/graphics/GraphicalRegularPolygon.scala @@ -0,0 +1,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) + } +}
\ No newline at end of file |