/**
  * The graphical representation of the legend shape.
  *
  * @param canvas the canvas to paint to
  * @param renderer the series renderer
  * @param x the x value of the point the shape should be drawn at
  * @param y the y value of the point the shape should be drawn at
  * @param seriesIndex the series index
  * @param paint the paint to be used for drawing
  */
 public void drawLegendShape(
     Canvas canvas,
     SimpleSeriesRenderer renderer,
     float x,
     float y,
     int seriesIndex,
     Paint paint) {
   canvas.drawLine(x, y, x + SHAPE_WIDTH, y, paint);
   if (isRenderPoints(renderer)) {
     pointsChart.drawLegendShape(canvas, renderer, x + 5, y, seriesIndex, paint);
   }
 }
Example #2
0
 /**
  * The graphical representation of the legend shape.
  *
  * @param canvas the canvas to paint to
  * @param renderer the series renderer
  * @param x the x value of the point the shape should be drawn at
  * @param y the y value of the point the shape should be drawn at
  * @param seriesIndex the series index
  * @param paint the paint to be used for drawing
  */
 public void drawLegendShape(
     Canvas canvas,
     SimpleSeriesRenderer renderer,
     float x,
     float y,
     int seriesIndex,
     Paint paint) {
   float oldWidth = paint.getStrokeWidth();
   paint.setStrokeWidth(((XYSeriesRenderer) renderer).getLineWidth());
   canvas.drawLine(x, y, x + SHAPE_WIDTH, y, paint);
   paint.setStrokeWidth(oldWidth);
   if (isRenderPoints(renderer)) {
     pointsChart.drawLegendShape(canvas, renderer, x + 5, y, seriesIndex, paint);
   }
 }