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

package graphyx.graphics

import sims._
import geometry._
import dynamics._
class GraphicalCircle(val real: Circle) extends Circle(real.radius, real.density) with GraphicalShape{
  override def draw() = {
    //val b = Math.min(density / 100 * 255, 255)
    //g.setColor(new java.awt.Color(0,0,255, b.toInt))
    g.setColor(java.awt.Color.blue)
    fillCircle(pos, real.radius)
    g.setColor(java.awt.Color.BLACK)
    drawCircle(pos, real.radius)
    this.drawLine(pos, pos + (Vector2D.i rotate rotation) * real.radius)
  }
}