本文整理汇总了Java中lecho.lib.hellocharts.model.Axis.getTypeface方法的典型用法代码示例。如果您正苦于以下问题:Java Axis.getTypeface方法的具体用法?Java Axis.getTypeface怎么用?Java Axis.getTypeface使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lecho.lib.hellocharts.model.Axis
的用法示例。
在下文中一共展示了Axis.getTypeface方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initAxisPaints
import lecho.lib.hellocharts.model.Axis; //导入方法依赖的package包/类
private void initAxisPaints(Axis axis, int position) {
Typeface typeface = axis.getTypeface();
if (null != typeface) {
labelPaintTab[position].setTypeface(typeface);
namePaintTab[position].setTypeface(typeface);
}
labelPaintTab[position].setColor(axis.getTextColor());
labelPaintTab[position].setTextSize(ChartUtils.sp2px(scaledDensity, axis.getTextSize()));
labelPaintTab[position].getFontMetricsInt(fontMetricsTab[position]);
namePaintTab[position].setColor(axis.getTextColor());
namePaintTab[position].setTextSize(ChartUtils.sp2px(scaledDensity, axis.getTextSize()));
linePaintTab[position].setColor(axis.getLineColor());
labelTextAscentTab[position] = Math.abs(fontMetricsTab[position].ascent);
labelTextDescentTab[position] = Math.abs(fontMetricsTab[position].descent);
labelWidthTab[position] = (int) labelPaintTab[position].measureText(labelWidthChars, 0,
axis.getMaxLabelChars());
}
示例2: initAxisPaints
import lecho.lib.hellocharts.model.Axis; //导入方法依赖的package包/类
private void initAxisPaints(Axis axis, int position) {
Typeface typeface = axis.getTypeface();
if (typeface != null) {
this.labelPaintTab[position].setTypeface(typeface);
this.namePaintTab[position].setTypeface(typeface);
}
this.labelPaintTab[position].setColor(axis.getTextColor());
this.labelPaintTab[position].setTextSize((float) ChartUtils.sp2px(this.scaledDensity, axis.getTextSize()));
this.labelPaintTab[position].getFontMetricsInt(this.fontMetricsTab[position]);
this.namePaintTab[position].setColor(axis.getTextColor());
this.namePaintTab[position].setTextSize((float) ChartUtils.sp2px(this.scaledDensity, axis.getTextSize()));
this.linePaintTab[position].setColor(axis.getLineColor());
this.labelTextAscentTab[position] = Math.abs(this.fontMetricsTab[position].ascent);
this.labelTextDescentTab[position] = Math.abs(this.fontMetricsTab[position].descent);
this.labelWidthTab[position] = (int) this.labelPaintTab[position].measureText(labelWidthChars, 0, axis.getMaxLabelChars());
}