public class Transformer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected android.graphics.Matrix |
mMatrixOffset
matrix for handling the different offsets of the chart
|
protected android.graphics.Matrix |
mMatrixValueToPx
matrix to map the values to the screen pixels
|
protected android.graphics.Matrix |
mPixelToValueMatrixBuffer |
protected ViewPortHandler |
mViewPortHandler |
protected float[] |
valuePointsForGenerateTransformedValuesBubble |
protected float[] |
valuePointsForGenerateTransformedValuesCandle |
protected float[] |
valuePointsForGenerateTransformedValuesLine |
protected float[] |
valuePointsForGenerateTransformedValuesScatter |
| Constructor and Description |
|---|
Transformer(ViewPortHandler viewPortHandler) |
| Modifier and Type | Method and Description |
|---|---|
float[] |
generateTransformedValuesBubble(IBubbleDataSet data,
float phaseY,
int from,
int to)
Transforms an List of Entry into a float array containing the x and
y values transformed with all matrices for the BUBBLECHART.
|
float[] |
generateTransformedValuesCandle(ICandleDataSet data,
float phaseX,
float phaseY,
int from,
int to)
Transforms an List of Entry into a float array containing the x and
y values transformed with all matrices for the CANDLESTICKCHART.
|
float[] |
generateTransformedValuesLine(ILineDataSet data,
float phaseX,
float phaseY,
int min,
int max)
Transforms an List of Entry into a float array containing the x and
y values transformed with all matrices for the LINECHART.
|
float[] |
generateTransformedValuesScatter(IScatterDataSet data,
float phaseX,
float phaseY,
int from,
int to)
Transforms an List of Entry into a float array containing the x and
y values transformed with all matrices for the SCATTERCHART.
|
android.graphics.Matrix |
getOffsetMatrix() |
MPPointD |
getPixelForValues(float x,
float y)
Returns a recyclable MPPointD instance.
|
android.graphics.Matrix |
getPixelToValueMatrix() |
android.graphics.Matrix |
getValueMatrix() |
MPPointD |
getValuesByTouchPoint(float x,
float y)
Returns a recyclable MPPointD instance.
|
void |
getValuesByTouchPoint(float x,
float y,
MPPointD outputPoint) |
android.graphics.Matrix |
getValueToPixelMatrix() |
void |
pathValuesToPixel(java.util.List<android.graphics.Path> paths)
Transforms multiple paths will all matrices.
|
void |
pathValueToPixel(android.graphics.Path path)
transform a path with all the given matrices VERY IMPORTANT: keep order
to value-touch-offset
|
void |
pixelsToValue(float[] pixels)
Transforms the given array of touch positions (pixels) (x, y, x, y, ...)
into values on the chart.
|
void |
pointValuesToPixel(float[] pts)
Transform an array of points with all matrices.
|
void |
prepareMatrixOffset(boolean inverted)
Prepares the matrix that contains all offsets.
|
void |
prepareMatrixValuePx(float xChartMin,
float deltaX,
float deltaY,
float yChartMin)
Prepares the matrix that transforms values to pixels.
|
void |
rectToPixelPhase(android.graphics.RectF r,
float phaseY)
Transform a rectangle with all matrices with potential animation phases.
|
void |
rectToPixelPhaseHorizontal(android.graphics.RectF r,
float phaseY) |
void |
rectValuesToPixel(java.util.List<android.graphics.RectF> rects)
transforms multiple rects with all matrices
|
void |
rectValueToPixel(android.graphics.RectF r)
Transform a rectangle with all matrices.
|
void |
rectValueToPixelHorizontal(android.graphics.RectF r)
Transform a rectangle with all matrices with potential animation phases.
|
void |
rectValueToPixelHorizontal(android.graphics.RectF r,
float phaseY)
Transform a rectangle with all matrices with potential animation phases.
|
protected android.graphics.Matrix mMatrixValueToPx
protected android.graphics.Matrix mMatrixOffset
protected ViewPortHandler mViewPortHandler
protected float[] valuePointsForGenerateTransformedValuesScatter
protected float[] valuePointsForGenerateTransformedValuesBubble
protected float[] valuePointsForGenerateTransformedValuesLine
protected float[] valuePointsForGenerateTransformedValuesCandle
protected android.graphics.Matrix mPixelToValueMatrixBuffer
public Transformer(ViewPortHandler viewPortHandler)
public void prepareMatrixValuePx(float xChartMin,
float deltaX,
float deltaY,
float yChartMin)
xChartMin - deltaX - deltaY - yChartMin - public void prepareMatrixOffset(boolean inverted)
inverted - public float[] generateTransformedValuesScatter(IScatterDataSet data, float phaseX, float phaseY, int from, int to)
data - public float[] generateTransformedValuesBubble(IBubbleDataSet data, float phaseY, int from, int to)
data - public float[] generateTransformedValuesLine(ILineDataSet data, float phaseX, float phaseY, int min, int max)
data - public float[] generateTransformedValuesCandle(ICandleDataSet data, float phaseX, float phaseY, int from, int to)
data - public void pathValueToPixel(android.graphics.Path path)
path - public void pathValuesToPixel(java.util.List<android.graphics.Path> paths)
paths - public void pointValuesToPixel(float[] pts)
pts - public void rectValueToPixel(android.graphics.RectF r)
r - public void rectToPixelPhase(android.graphics.RectF r,
float phaseY)
r - phaseY - public void rectToPixelPhaseHorizontal(android.graphics.RectF r,
float phaseY)
public void rectValueToPixelHorizontal(android.graphics.RectF r)
r - public void rectValueToPixelHorizontal(android.graphics.RectF r,
float phaseY)
r - phaseY - public void rectValuesToPixel(java.util.List<android.graphics.RectF> rects)
rects - public void pixelsToValue(float[] pixels)
pixels - public MPPointD getValuesByTouchPoint(float x, float y)
x - y - public void getValuesByTouchPoint(float x,
float y,
MPPointD outputPoint)
public MPPointD getPixelForValues(float x, float y)
x - y - public android.graphics.Matrix getValueMatrix()
public android.graphics.Matrix getOffsetMatrix()
public android.graphics.Matrix getValueToPixelMatrix()
public android.graphics.Matrix getPixelToValueMatrix()