Example #1
0
 /**
  * Draws all the fingers on the graphics object using the normalized points stored in the
  * PointListener
  *
  * @param g Graphics object used for drawing
  */
 public void drawFingers(Graphics g) {
   g.setColor(Color.green);
   Vector fingerPosition = pointListener.getNormalizedFingerPosition();
   if (fingerPosition == null) {
     return;
   }
   float circleX = getWidth() * fingerPosition.getX();
   float circleY = getHeight() * (1 - fingerPosition.getY());
   float radius = getWidth() * FINGER_RADIUS_RATIO;
   drawCircle(g, (int) circleX, (int) circleY, (int) radius);
 }