public void draw(PlaPointFloat[] p_points,double p_half_width,Color p_color,Graphics p_g,double p_translucency_factor){
  if (p_color == null)   return;
  Graphics2D g2=(Graphics2D)p_g;
  Rectangle clip_shape=(Rectangle)p_g.getClip();
  ShapeTileBox clip_box=coordinate_transform.screen_to_board(clip_shape);
  double scaled_width=coordinate_transform.board_to_screen(p_half_width);
  init_draw_graphics(g2,p_color,(float)scaled_width * 2);
  set_translucency(g2,p_translucency_factor);
  GeneralPath draw_path=null;
  if (!show_line_segments) {
    draw_path=new GeneralPath();
  }
  for (int i=0; i < (p_points.length - 1); i++) {
    if (line_outside_update_box(p_points[i],p_points[i + 1],p_half_width + update_offset,clip_box)) {
      continue;
    }
    Point2D p1=coordinate_transform.board_to_screen(p_points[i]);
    Point2D p2=coordinate_transform.board_to_screen(p_points[i + 1]);
    Line2D line=new Line2D.Double(p1,p2);
    if (show_line_segments) {
      g2.draw(line);
    }
 else {
      draw_path.append(line,false);
    }
  }
  if (!show_line_segments) {
    g2.draw(draw_path);
  }
}

public void draw ( PlaPointFloat [ ] p_points , double p_half_width , Color p_color , Graphics p_g , double p_translucency_factor ) { if ( p_color == null ) return ; Graphics2D g2 = ( Graphics2D ) p_g ; Rectangle clip_shape = ( Rectangle ) p_g . getClip ( ) ; ShapeTileBox clip_box = coordinate_transform . screen_to_board ( clip_shape ) ; double scaled_width = coordinate_transform . board_to_screen ( p_half_width ) ; init_draw_graphics ( g2 , p_color , ( float ) scaled_width * 2 ) ; set_translucency ( g2 , p_translucency_factor ) ; GeneralPath draw_path = null ; if ( ! show_line_segments ) { draw_path = new GeneralPath ( ) ; } for ( int i = 0 ; i < ( p_points . length - 1 ) ; i ++ ) { if ( line_outside_update_box ( p_points [ i ] , p_points [ i + 1 ] , p_half_width + update_offset , clip_box ) ) { continue ; } Point2D p1 = coordinate_transform . board_to_screen ( p_points [ i ] ) ; Point2D p2 = coordinate_transform . board_to_screen ( p_points [ i + 1 ] ) ; Line2D line = new Line2D . Double ( p1 , p2 ) ; if ( show_line_segments ) { g2 . draw ( line ) ; } else { draw_path . append ( line , false ) ; } } if ( ! show_line_segments ) { g2 . draw ( draw_path ) ; } }
draws a polygon with corners p_points
