com.androidplot.pie
Class PieRenderer

java.lang.Object
  extended by com.androidplot.ui.SeriesRenderer<PieChart,Segment,SegmentFormatter>
      extended by com.androidplot.pie.PieRenderer

public class PieRenderer
extends SeriesRenderer<PieChart,Segment,SegmentFormatter>


Nested Class Summary
static class PieRenderer.DonutMode
           
 
Constructor Summary
PieRenderer(PieChart plot)
           
 
Method Summary
 Segment getContainingSegment(android.graphics.PointF point)
          Retrieve the segment containing the specified point.
 float getEndDeg()
           
 float getRadius(android.graphics.RectF rect)
           
 float getStartDeg()
           
 void onRender(android.graphics.Canvas canvas, android.graphics.RectF plotArea)
           
 void setDonutSize(float size, PieRenderer.DonutMode mode)
           
 void setEndDeg(float deg)
           
 void setStartDeg(float deg)
           
 
Methods inherited from class com.androidplot.ui.SeriesRenderer
drawSeriesLegendIcon, getFormatter, getPlot, getSeriesAndFormatterList, render, setPlot
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PieRenderer

public PieRenderer(PieChart plot)
Method Detail

getRadius

public float getRadius(android.graphics.RectF rect)

onRender

public void onRender(android.graphics.Canvas canvas,
                     android.graphics.RectF plotArea)
              throws PlotRenderException
Specified by:
onRender in class SeriesRenderer<PieChart,Segment,SegmentFormatter>
Throws:
PlotRenderException

setDonutSize

public void setDonutSize(float size,
                         PieRenderer.DonutMode mode)

getContainingSegment

public Segment getContainingSegment(android.graphics.PointF point)
Retrieve the segment containing the specified point. This current implementation only matches against angle; clicks outside of the pie/donut inner/outer boundaries will still trigger a match on the segment whose begining and ending angle contains the angle of the line drawn between the pie chart's center point and the clicked point.

Parameters:
point - The clicked point
Returns:
Segment containing the clicked point.

setStartDeg

public void setStartDeg(float deg)

getStartDeg

public float getStartDeg()

setEndDeg

public void setEndDeg(float deg)

getEndDeg

public float getEndDeg()


Copyright © 2010-2014 androidplot.com. All Rights Reserved.