本文整理汇总了Java中org.achartengine.renderer.BasicStroke类的典型用法代码示例。如果您正苦于以下问题:Java BasicStroke类的具体用法?Java BasicStroke怎么用?Java BasicStroke使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BasicStroke类属于org.achartengine.renderer包,在下文中一共展示了BasicStroke类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawSeries
import org.achartengine.renderer.BasicStroke; //导入依赖的package包/类
/**
* Draws the series.
*
* @param series the series
* @param canvas the canvas
* @param paint the paint object
* @param pointsList the points to be rendered
* @param seriesRenderer the series renderer
* @param yAxisValue the y axis value in pixels
* @param seriesIndex the series index
* @param or the orientation
* @param startIndex the start index of the rendering points
*/
protected void drawSeries(XYSeries series, Canvas canvas, Paint paint, List<Float> pointsList,
XYSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, Orientation or,
int startIndex) {
BasicStroke stroke = seriesRenderer.getStroke();
Cap cap = paint.getStrokeCap();
Join join = paint.getStrokeJoin();
float miter = paint.getStrokeMiter();
PathEffect pathEffect = paint.getPathEffect();
Style style = paint.getStyle();
if (stroke != null) {
PathEffect effect = null;
if (stroke.getIntervals() != null) {
effect = new DashPathEffect(stroke.getIntervals(), stroke.getPhase());
}
setStroke(stroke.getCap(), stroke.getJoin(), stroke.getMiter(), Style.FILL_AND_STROKE,
effect, paint);
}
// float[] points = MathHelper.getFloats(pointsList);
drawSeries(canvas, paint, pointsList, seriesRenderer, yAxisValue, seriesIndex, startIndex);
drawPoints(canvas, paint, pointsList, seriesRenderer, yAxisValue, seriesIndex, startIndex);
paint.setTextSize(seriesRenderer.getChartValuesTextSize());
if (or == Orientation.HORIZONTAL) {
paint.setTextAlign(Align.CENTER);
} else {
paint.setTextAlign(Align.LEFT);
}
if (seriesRenderer.isDisplayChartValues()) {
paint.setTextAlign(seriesRenderer.getChartValuesTextAlign());
drawChartValuesText(canvas, series, seriesRenderer, paint, pointsList, seriesIndex,
startIndex);
}
if (stroke != null) {
setStroke(cap, join, miter, style, pathEffect, paint);
}
}
示例2: drawSeries
import org.achartengine.renderer.BasicStroke; //导入依赖的package包/类
/**
* Draws the series.
*
* @param series the series
* @param canvas the canvas
* @param paint the paint object
* @param pointsList the points to be rendered
* @param seriesRenderer the series renderer
* @param yAxisValue the y axis value in pixels
* @param seriesIndex the series index
* @param or the orientation
* @param startIndex the start index of the rendering points
*/
protected void drawSeries(XYSeries series, Canvas canvas, Paint paint, List<Float> pointsList,
XYSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, Orientation or,
int startIndex) {
BasicStroke stroke = seriesRenderer.getStroke();
Cap cap = paint.getStrokeCap();
Join join = paint.getStrokeJoin();
float miter = paint.getStrokeMiter();
PathEffect pathEffect = paint.getPathEffect();
Style style = paint.getStyle();
if (stroke != null) {
PathEffect effect = null;
if (stroke.getIntervals() != null) {
effect = new DashPathEffect(stroke.getIntervals(), stroke.getPhase());
}
setStroke(stroke.getCap(), stroke.getJoin(), stroke.getMiter(), Style.FILL_AND_STROKE,
effect, paint);
}
// float[] points = MathHelper.getFloats(pointsList);
drawSeries(canvas, paint, pointsList, seriesRenderer, yAxisValue, seriesIndex, startIndex);
if (isRenderPoints(seriesRenderer)) {
ScatterChart pointsChart = getPointsChart();
if (pointsChart != null) {
pointsChart.drawSeries(canvas, paint, pointsList, seriesRenderer, yAxisValue, seriesIndex,
startIndex);
}
}
paint.setTextSize(seriesRenderer.getChartValuesTextSize());
if (or == Orientation.HORIZONTAL) {
paint.setTextAlign(Align.CENTER);
} else {
paint.setTextAlign(Align.LEFT);
}
if (seriesRenderer.isDisplayChartValues()) {
paint.setTextAlign(seriesRenderer.getChartValuesTextAlign());
drawChartValuesText(canvas, series, seriesRenderer, paint, pointsList, seriesIndex,
startIndex);
}
if (stroke != null) {
setStroke(cap, join, miter, style, pathEffect, paint);
}
}
示例3: drawSeries
import org.achartengine.renderer.BasicStroke; //导入依赖的package包/类
protected void drawSeries(XYSeries xyseries, Canvas canvas, Paint paint, List list, SimpleSeriesRenderer simpleseriesrenderer, float f1, int i,
org.achartengine.renderer.XYMultipleSeriesRenderer.Orientation orientation, int j)
{
BasicStroke basicstroke = simpleseriesrenderer.getStroke();
android.graphics.Paint.Cap cap = paint.getStrokeCap();
android.graphics.Paint.Join join = paint.getStrokeJoin();
float f2 = paint.getStrokeMiter();
PathEffect patheffect = paint.getPathEffect();
android.graphics.Paint.Style style = paint.getStyle();
if (basicstroke != null)
{
float af[] = basicstroke.getIntervals();
DashPathEffect dashpatheffect = null;
if (af != null)
{
dashpatheffect = new DashPathEffect(basicstroke.getIntervals(), basicstroke.getPhase());
}
a(basicstroke.getCap(), basicstroke.getJoin(), basicstroke.getMiter(), android.graphics.Paint.Style.FILL_AND_STROKE, dashpatheffect, paint);
}
drawSeries(canvas, paint, list, simpleseriesrenderer, f1, i, j);
if (isRenderPoints(simpleseriesrenderer))
{
ScatterChart scatterchart = getPointsChart();
if (scatterchart != null)
{
scatterchart.drawSeries(canvas, paint, list, simpleseriesrenderer, f1, i, j);
}
}
paint.setTextSize(simpleseriesrenderer.getChartValuesTextSize());
if (orientation == org.achartengine.renderer.XYMultipleSeriesRenderer.Orientation.HORIZONTAL)
{
paint.setTextAlign(android.graphics.Paint.Align.CENTER);
} else
{
paint.setTextAlign(android.graphics.Paint.Align.LEFT);
}
if (simpleseriesrenderer.isDisplayChartValues())
{
paint.setTextAlign(simpleseriesrenderer.getChartValuesTextAlign());
drawChartValuesText(canvas, xyseries, simpleseriesrenderer, paint, list, i, j);
}
if (basicstroke != null)
{
a(cap, join, f2, style, patheffect, paint);
}
}
示例4: drawSeries
import org.achartengine.renderer.BasicStroke; //导入依赖的package包/类
/**
* Draws the series.
*
* @param series the series
* @param canvas the canvas
* @param paint the paint object
* @param pointsList the points to be rendered
* @param seriesRenderer the series renderer
* @param yAxisValue the y axis value in pixels
* @param seriesIndex the series index
* @param or the orientation
* @param startIndex the start index of the rendering points
*/
protected void drawSeries(XYSeries series, Canvas canvas, Paint paint, List<Float> pointsList,
SimpleSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, Orientation or,
int startIndex) {
BasicStroke stroke = seriesRenderer.getStroke();
Cap cap = paint.getStrokeCap();
Join join = paint.getStrokeJoin();
float miter = paint.getStrokeMiter();
PathEffect pathEffect = paint.getPathEffect();
Style style = paint.getStyle();
if (stroke != null) {
PathEffect effect = null;
if (stroke.getIntervals() != null) {
effect = new DashPathEffect(stroke.getIntervals(), stroke.getPhase());
}
setStroke(stroke.getCap(), stroke.getJoin(), stroke.getMiter(), Style.FILL_AND_STROKE,
effect, paint);
}
// float[] points = MathHelper.getFloats(pointsList);
drawSeries(canvas, mScreenR.top, mScreenR.bottom, paint, pointsList, seriesRenderer, yAxisValue, seriesIndex, startIndex);
if (isRenderPoints(seriesRenderer)) {
ScatterChart pointsChart = getPointsChart();
if (pointsChart != null) {
pointsChart.drawSeries(canvas, mScreenR.top, mScreenR.bottom, paint, pointsList, seriesRenderer, yAxisValue, seriesIndex,
startIndex);
}
}
paint.setTextSize(seriesRenderer.getChartValuesTextSize());
if (or == Orientation.HORIZONTAL) {
paint.setTextAlign(Align.CENTER);
} else {
paint.setTextAlign(Align.LEFT);
}
if (seriesRenderer.isDisplayChartValues()) {
paint.setTextAlign(seriesRenderer.getChartValuesTextAlign());
drawChartValuesText(canvas, series, seriesRenderer, paint, pointsList, seriesIndex,
startIndex);
}
if (stroke != null) {
setStroke(cap, join, miter, style, pathEffect, paint);
}
}
示例5: getStroke
import org.achartengine.renderer.BasicStroke; //导入依赖的package包/类
/**
* get stroke for an ID number preferrably unique pid number
* this is to get persistent coloring/lining for each id
* @param id id to get color for
* @return color for given ID
*/
public static BasicStroke getStroke(int id)
{
return stroke[(id / colors.length) % stroke.length];
}