test_class.declarator: xyPlot
test_class.modifier: private
test_class.original_string: private XYPlot xyPlot;
test_class.type: XYPlot
test_class.var_name: xyPlot
test_class.declarator: canvas
test_class.modifier: @Mock
test_class.original_string: @Mock
      Canvas canvas;
test_class.type: Canvas
test_class.var_name: canvas
test_class.declarator: plotArea = new RectF(0, 0, 100, 100)
test_class.original_string: RectF plotArea = new RectF(0, 0, 100, 100);
test_class.type: RectF
test_class.var_name: plotArea
test_class.file: androidplot-core/src/test/java/com/androidplot/xy/LineAndPointRendererTest.java
test_class.identifier: LineAndPointRendererTest
test_class.superclass: extends AndroidplotTest
test_case.body: @Test
      public void renderPath_rendersRegions() {
          LineAndPointFormatter formatter =
                  new LineAndPointFormatter(0, 0, 0, null);
  
          XYRegionFormatter r1 = new XYRegionFormatter(Color.RED);
          formatter.addRegion(new RectRegion(0, 2, 0, 2, "region1"), r1);
  
          XYRegionFormatter r2 = new XYRegionFormatter(Color.GREEN);
          formatter.addRegion(new RectRegion(0, 2, 0, 2, "region2"), r2);
  
          SimpleXYSeries series = new SimpleXYSeries(
                  SimpleXYSeries.ArrayFormat.Y_VALS_ONLY, "some data", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
  
          xyPlot.addSeries(series, formatter);
          LineAndPointRenderer renderer = xyPlot.getRenderer(LineAndPointRenderer.class);
  
          //xyPlot.draw(canvas);
          renderer.renderPath(canvas, plotArea, new Path(), mock(PointF.class), mock(PointF.class), formatter);
          verify(canvas).drawRect(any(RectF.class), eq(r1.getPaint()));
          verify(canvas).drawRect(any(RectF.class), eq(r2.getPaint()));
      }
test_case.class_method_signature: LineAndPointRendererTest.renderPath_rendersRegions()
test_case.full_signature: @Test public void renderPath_rendersRegions()
test_case.identifier: renderPath_rendersRegions
test_case.invocations: addRegion addRegion addSeries getRenderer renderPath mock mock drawRect verify any eq getPaint drawRect verify any eq getPaint
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void renderPath_rendersRegions()
focal_class.declarator: ZERO = 0
focal_class.modifier: protected static final
focal_class.original_string: protected static final int ZERO = 0;
focal_class.type: int
focal_class.var_name: ZERO
focal_class.declarator: ONE = 1
focal_class.modifier: protected static final
focal_class.original_string: protected static final int ONE = 1;
focal_class.type: int
focal_class.var_name: ONE
focal_class.declarator: path = new Path()
focal_class.modifier: private final
focal_class.original_string: private final Path path = new Path();
focal_class.type: Path
focal_class.var_name: path
focal_class.declarator: pointsCaches
              = new ConcurrentHashMap<>(2, 0.75f, 2)
focal_class.modifier: protected final
focal_class.original_string: protected final ConcurrentHashMap<XYSeries, ArrayList<PointF>> pointsCaches
              = new ConcurrentHashMap<>(2, 0.75f, 2);
focal_class.type: ConcurrentHashMap<XYSeries, ArrayList<PointF>>
focal_class.var_name: pointsCaches
focal_class.file: androidplot-core/src/main/java/com/androidplot/xy/LineAndPointRenderer.java
focal_class.identifier: LineAndPointRenderer
focal_class.class_method_signature: LineAndPointRenderer.LineAndPointRenderer(XYPlot plot)
focal_class.full_signature: public  LineAndPointRenderer(XYPlot plot)
focal_class.identifier: LineAndPointRenderer
focal_class.modifiers: public
focal_class.parameters: (XYPlot plot)
focal_class.signature:  LineAndPointRenderer(XYPlot plot)
focal_class.class_method_signature: LineAndPointRenderer.onRender(Canvas canvas, RectF plotArea, XYSeries series, FormatterType formatter, RenderStack stack)
focal_class.full_signature: @Override public void onRender(Canvas canvas, RectF plotArea, XYSeries series, FormatterType formatter, RenderStack stack)
focal_class.identifier: onRender
focal_class.modifiers: @Override public
focal_class.parameters: (Canvas canvas, RectF plotArea, XYSeries series, FormatterType formatter, RenderStack stack)
focal_class.return: void
focal_class.signature: void onRender(Canvas canvas, RectF plotArea, XYSeries series, FormatterType formatter, RenderStack stack)
focal_class.class_method_signature: LineAndPointRenderer.doDrawLegendIcon(Canvas canvas, RectF rect, LineAndPointFormatter formatter)
focal_class.full_signature: @Override public void doDrawLegendIcon(Canvas canvas, RectF rect, LineAndPointFormatter formatter)
focal_class.identifier: doDrawLegendIcon
focal_class.modifiers: @Override public
focal_class.parameters: (Canvas canvas, RectF rect, LineAndPointFormatter formatter)
focal_class.return: void
focal_class.signature: void doDrawLegendIcon(Canvas canvas, RectF rect, LineAndPointFormatter formatter)
focal_class.class_method_signature: LineAndPointRenderer.appendToPath(Path path, PointF thisPoint, PointF lastPoint)
focal_class.full_signature: protected void appendToPath(Path path, PointF thisPoint, PointF lastPoint)
focal_class.identifier: appendToPath
focal_class.modifiers: protected
focal_class.parameters: (Path path, PointF thisPoint, PointF lastPoint)
focal_class.return: void
focal_class.signature: void appendToPath(Path path, PointF thisPoint, PointF lastPoint)
focal_class.class_method_signature: LineAndPointRenderer.getPointsCache(XYSeries series)
focal_class.full_signature: protected ArrayList<PointF> getPointsCache(XYSeries series)
focal_class.identifier: getPointsCache
focal_class.modifiers: protected
focal_class.parameters: (XYSeries series)
focal_class.return: ArrayList<PointF>
focal_class.signature: ArrayList<PointF> getPointsCache(XYSeries series)
focal_class.class_method_signature: LineAndPointRenderer.cullPointsCache()
focal_class.full_signature: protected void cullPointsCache()
focal_class.identifier: cullPointsCache
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void cullPointsCache()
focal_class.class_method_signature: LineAndPointRenderer.drawSeries(Canvas canvas, RectF plotArea, XYSeries series, LineAndPointFormatter formatter)
focal_class.full_signature: protected void drawSeries(Canvas canvas, RectF plotArea, XYSeries series, LineAndPointFormatter formatter)
focal_class.identifier: drawSeries
focal_class.modifiers: protected
focal_class.parameters: (Canvas canvas, RectF plotArea, XYSeries series, LineAndPointFormatter formatter)
focal_class.return: void
focal_class.signature: void drawSeries(Canvas canvas, RectF plotArea, XYSeries series, LineAndPointFormatter formatter)
focal_class.class_method_signature: LineAndPointRenderer.getInterpolator(InterpolationParams params)
focal_class.full_signature: protected Interpolator getInterpolator(InterpolationParams params)
focal_class.identifier: getInterpolator
focal_class.modifiers: protected
focal_class.parameters: (InterpolationParams params)
focal_class.return: Interpolator
focal_class.signature: Interpolator getInterpolator(InterpolationParams params)
focal_class.class_method_signature: LineAndPointRenderer.convertPoint(XYCoords coord, RectF plotArea)
focal_class.full_signature: protected PointF convertPoint(XYCoords coord, RectF plotArea)
focal_class.identifier: convertPoint
focal_class.modifiers: protected
focal_class.parameters: (XYCoords coord, RectF plotArea)
focal_class.return: PointF
focal_class.signature: PointF convertPoint(XYCoords coord, RectF plotArea)
focal_class.class_method_signature: LineAndPointRenderer.renderPoints(Canvas canvas, RectF plotArea, XYSeries series, int iStart, int iEnd, List<PointF> points,
                                  LineAndPointFormatter formatter)
focal_class.full_signature: protected void renderPoints(Canvas canvas, RectF plotArea, XYSeries series, int iStart, int iEnd, List<PointF> points,
                                  LineAndPointFormatter formatter)
focal_class.identifier: renderPoints
focal_class.modifiers: protected
focal_class.parameters: (Canvas canvas, RectF plotArea, XYSeries series, int iStart, int iEnd, List<PointF> points,
                                  LineAndPointFormatter formatter)
focal_class.return: void
focal_class.signature: void renderPoints(Canvas canvas, RectF plotArea, XYSeries series, int iStart, int iEnd, List<PointF> points,
                                  LineAndPointFormatter formatter)
focal_class.class_method_signature: LineAndPointRenderer.renderPath(Canvas canvas, RectF plotArea, Path path, PointF firstPoint, PointF lastPoint, LineAndPointFormatter formatter)
focal_class.full_signature: protected void renderPath(Canvas canvas, RectF plotArea, Path path, PointF firstPoint, PointF lastPoint, LineAndPointFormatter formatter)
focal_class.identifier: renderPath
focal_class.modifiers: protected
focal_class.parameters: (Canvas canvas, RectF plotArea, Path path, PointF firstPoint, PointF lastPoint, LineAndPointFormatter formatter)
focal_class.return: void
focal_class.signature: void renderPath(Canvas canvas, RectF plotArea, Path path, PointF firstPoint, PointF lastPoint, LineAndPointFormatter formatter)
focal_class.superclass: extends XYSeriesRenderer<XYSeries, FormatterType>
focal_method.body: protected void renderPath(Canvas canvas, RectF plotArea, Path path, PointF firstPoint, PointF lastPoint, LineAndPointFormatter formatter) {
          Path outlinePath = new Path(path);
  
          // determine how to close the path for filling purposes:
          // We always need to calculate this path because it is also used for
          // masking off for region highlighting.
          switch (formatter.getFillDirection()) {
              case BOTTOM:
                  path.lineTo(lastPoint.x, plotArea.bottom);
                  path.lineTo(firstPoint.x, plotArea.bottom);
                  path.close();
                  break;
              case TOP:
                  path.lineTo(lastPoint.x, plotArea.top);
                  path.lineTo(firstPoint.x, plotArea.top);
                  path.close();
                  break;
              case RANGE_ORIGIN:
                  float originPix = (float) getPlot().getBounds().getxRegion()
                          .transform(getPlot().getRangeOrigin()
                                  .doubleValue(), plotArea.top, plotArea.bottom, true);
                  path.lineTo(lastPoint.x, originPix);
                  path.lineTo(firstPoint.x, originPix);
                  path.close();
                  break;
              default:
                  throw new UnsupportedOperationException(
                          "Fill direction not yet implemented: " + formatter.getFillDirection());
          }
  
          if (formatter.getFillPaint() != null) {
              canvas.drawPath(path, formatter.getFillPaint());
          }
  
          final RectRegion bounds = getPlot().getBounds();
          final RectRegion plotRegion = new RectRegion(plotArea);
  
          // draw each region:
          for (RectRegion thisRegion : bounds.intersects(formatter.getRegions().elements())) {
              XYRegionFormatter regionFormatter = formatter.getRegionFormatter(thisRegion);
              RectRegion thisRegionTransformed = bounds
                      .transform(thisRegion, plotRegion, false, true);
              thisRegionTransformed.intersect(plotRegion);
              if(thisRegion.isFullyDefined()) {
                  RectF thisRegionRectF = thisRegionTransformed.asRectF();
                  if (thisRegionRectF != null) {
                      try {
                          canvas.save();
                          canvas.clipPath(path);
                          canvas.drawRect(thisRegionRectF, regionFormatter.getPaint());
                      } finally {
                          canvas.restore();
                      }
                  }
              }
          }
  
          // finally we draw the outline path on top of everything else:
          if(formatter.hasLinePaint()) {
              canvas.drawPath(outlinePath, formatter.getLinePaint());
          }
  
          path.rewind();
      }
focal_method.class_method_signature: LineAndPointRenderer.renderPath(Canvas canvas, RectF plotArea, Path path, PointF firstPoint, PointF lastPoint, LineAndPointFormatter formatter)
focal_method.full_signature: protected void renderPath(Canvas canvas, RectF plotArea, Path path, PointF firstPoint, PointF lastPoint, LineAndPointFormatter formatter)
focal_method.identifier: renderPath
focal_method.invocations: getFillDirection lineTo lineTo close lineTo lineTo close transform getxRegion getBounds getPlot doubleValue getRangeOrigin getPlot lineTo lineTo close getFillDirection getFillPaint drawPath getFillPaint getBounds getPlot intersects elements getRegions getRegionFormatter transform intersect isFullyDefined asRectF save clipPath drawRect getPaint restore hasLinePaint drawPath getLinePaint rewind
focal_method.modifiers: protected
focal_method.parameters: (Canvas canvas, RectF plotArea, Path path, PointF firstPoint, PointF lastPoint, LineAndPointFormatter formatter)
focal_method.return: void
focal_method.signature: void renderPath(Canvas canvas, RectF plotArea, Path path, PointF firstPoint, PointF lastPoint, LineAndPointFormatter formatter)